Page 1 of 1

Loading JPG / GIF images

PostPosted: Aug 22, 2007 @ 5:18pm
by PointOfLight
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?

PostPosted: Aug 22, 2007 @ 7:35pm
by Dan East
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

PostPosted: Aug 22, 2007 @ 7:48pm
by PointOfLight
Thank you. I will definitely look into that. If anyone has any other options, please feel free to still share them.

PostPosted: Aug 22, 2007 @ 7:51pm
by Kzinti
There is the obvious: libpng, libjpg, etc... They aren't terribly complicated to setup.

PostPosted: Aug 22, 2007 @ 7:53pm
by PointOfLight
libjpg was one of the first things I thought of. Where can I get that?

PostPosted: Aug 22, 2007 @ 9:22pm
by Kzinti

PostPosted: Aug 22, 2007 @ 9:32pm
by PointOfLight
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.

PostPosted: Aug 27, 2007 @ 7:38pm
by mm40
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.

PostPosted: Aug 27, 2007 @ 8:24pm
by PointOfLight
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.