PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Loading JPG / GIF images

PointOfLight · 22 Aug 2007, 16:18 UTC
Apparently, for quite some time the s309 PictureBox control was the defacto standard for loading non-bitmap images on the PocketPC, at least where ActiveX controls are concerned. Unfortunately, the control is no longer in development, and it apparently has issues with WM5+. I could really use either an ActiveX control or a DLL that allows me to load and display JPG and GIF images. Anyone know of such a beast?
I used CxImage in one project. It does a whole lot more than just loading images, but it worked for me. Its open source, and is not an ActiveX control, but of course it could be compiled into one if you want to wrap it.

http://www.codeproject.com/bitmap/cximage.asp

Dan East
PointOfLight · 22 Aug 2007, 18:48 UTC
Thank you. I will definitely look into that. If anyone has any other options, please feel free to still share them.
There is the obvious: libpng, libjpg, etc... They aren't terribly complicated to setup.
PointOfLight · 22 Aug 2007, 18:53 UTC
libjpg was one of the first things I thought of. Where can I get that?
PointOfLight · 22 Aug 2007, 20:32 UTC
I've looked at that site before, but all they had was source code. I'm really not trying to be lazy here, though it may seem like it, but you wouldn't happen to know of someone that's created a PPC DLL for libjpg, would you? I figure, why reinvent the wheel.
If you only need to load your own images then TGA is the way to go, the code is super easy to get running. Otherwise you will need to hunt down a function like OleLoadPicture http://www.codeproject.com/bitmap/rende ... lect=35148 I thought it would work on CE but it looks like there is a comment on that page that it doesn't, it might be in the latest version of Windows Mobile though.

I did a little more searching, looks like this will work

http://www.codeguru.com/Cpp/W-P/ce/bitm ... .php/c3539

its the same function that PIE uses to load stuff, the benefit of using a DLL call is each function will be optimized for each device.
PointOfLight · 27 Aug 2007, 19:24 UTC
Unfortunately, this isn't for me at all. I'm trying to integrate some image loading functionality into a language called PPL, and the user who has requested it wants to use JPG files. We support that file type currently through PocketHAL, but they want to do it throw a standard Windows Mobile interface. I will give the second link a try, but I believe someone pointed out to me at one time that Microsoft is planning on depreciating the functionality of that DLL in future releases of Windows Mobile.