Page 1 of 3

Windows mobile 5, imgdecmp.dll fix

PostPosted: Sep 30, 2005 @ 2:44am
by Jaimi
Hi -

I've made a fix for DecompressImage() so that it works on windows mobile 5. This uses the IImagingFactory interface that was introduced in the Windows Mobile 2003 sdk, and no longer needs the imgdecmp.dll.

Is anyone interested in the changes? The IImagingFactory interface dates back to 1999, and should work on all devices.

PostPosted: Sep 30, 2005 @ 3:39am
by BIGBEN
Sure :D

You can see it from this thread:



You can include my Bugfix if you want to ;)

Or I can include your code in bugfix as PF improvement, if you don't mind.

You said 2003 SDK, does this mean it wouldn't work on 2000 and 2002 devices?
Or you check WM version to use this method only on WM 5 devices?

PostPosted: Sep 30, 2005 @ 3:56am
by Jaimi

PostPosted: Sep 30, 2005 @ 3:58am
by Jaimi

PostPosted: Sep 30, 2005 @ 4:14am
by fast_rx

PostPosted: Sep 30, 2005 @ 4:32am
by BIGBEN

PostPosted: Sep 30, 2005 @ 4:44am
by Jaimi

PostPosted: Sep 30, 2005 @ 4:46am
by Jaimi

PostPosted: Sep 30, 2005 @ 6:37am
by BIGBEN

PostPosted: Sep 30, 2005 @ 8:23am
by Slim

PostPosted: Sep 30, 2005 @ 9:14pm
by Jaimi

PostPosted: Sep 30, 2005 @ 10:25pm
by Presto
Coincidentally I just finished up my changes to PocketFrog to use SHLoadImageFile and SHLoadImageResource.

These changes work without requiring any extra stuff, including the IImagingFactory interface. Since both of the SHLoadImage functions return HBITMAPs, and there's already a CreateSurface() function that takes an HBITMAP, it's much cleaner this way.

A couple of notes:
1) Download the right version ( PF 0.7 or 0.8 )
2) SHLoadImageResource only seems to look for images in a "GIF" resource folder... pretty flippin' ignorant of Microsoft... so I changed the default from "image" to "GIF" in image.h.
3) Only PPC 2002 and above support SHLoadImage, so you'll have to drop support for PPC 2000. (But I don't think anyone will have a problem with that.)

http://www.pocketadventures.com/downloa ... ge_src.zip
http://www.pocketadventures.com/downloa ... ge_src.zip

-John

[EDIT: The files at PM vanished, and the upload utility isn't working, so I'm hosting them at PocketAdventures.com.]

PostPosted: Oct 1, 2005 @ 12:58am
by Jaimi
Just to set it straight, the IImagingFactory code doesn't require any new stuff either -- it's been built into the operating system since 1999.

Not saying that people shouldn't use yours (or that mine is better), but for me, the reason that I choose IImagingFactory over SHLoadImageFile (besides the GIF issue), is because IImagingFactory supported loading images straight from a buffer, and was a drop-in replacement for DecompressImage. Since I wanted to support loading textures from "pak" files, I needed this functionality.

This link is my entire PocketFrog directory. It includes the latest updates to pocketfrog 0.8.1 (from BigBen) and the latest PocketHal.


PostPosted: Oct 1, 2005 @ 2:47am
by Presto

PostPosted: Oct 1, 2005 @ 6:36am
by BIGBEN