PocketMatrix forums

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

PNG files

I would like to use PNG files in my application. Is anyone aware of any library that would make using png files easier ?

Basically all I would need is to load a png and apply it the background using the alpha channel. Is the only option using libpng and going pixel by pixel or is there an easier way ?

thanks
right, I was aware of libpng and the wince port. I was just looking for an easier way to do this rather than the using the libpng.

something along the lines of passing in a png file and a background image and getting the result...

perhaps hoping for too much :D
There is something called ImageMagick which is perfect for what you want, but I'm not sure if it is ported to WinCE or PocketPC. That said, it's open source so you could port it if you really needed to. www.imagemagick.org
well, I figured the best way would be to implement libpng, and so spend a couple of hours trying....

First thing I tried was getting the samples provided working. I managed to get it working on winxp, but when I try it on the ppc I keep running into an error.

anyone else have implemented libpng and have any pointers ?
Did it load the image, but the image didn't load correctly? Or could it not figure out the path to the file on PPC?
the image gets loaded correctly, gets recognized as a png, and everything is fine until this function call:

png_read_info(png_ptr, info_ptr);

at which point an error is returned (bad IHDR ?). The same works fine on my desktop though.