PDA

View Full Version : Reliability of Custom PNG Chunks



glBomb
04-23-2007, 08:01 AM
I am working on a 2D engine like Age of Empires. We have decided to put pictures of a single unit in different positions in the same picture and blit from there. The images are PNG. We decided to use the Custom Chunks feature of PNG images to store data about the frames inside the picture.Like the size of each frame, no. of angles in which the unit is positioned in the image etc.

How reliable is this approach ? Are there any popular games using this approach ?

I found that opening and saving the images in any popular editor causes the Custom Chunks to be removed. Also i was having problems reading in the Custom Chunks using libpng.

Please let me know your opinions.....thanks

ZbuffeR
04-23-2007, 04:56 PM
And this is related to OpenGL ... not really :)

I think you got the answer yourself, don't use a feature that your tools do not support. Just use some text files for such metadata, aside your PNGs.

glBomb
04-24-2007, 07:47 AM
Oh i am using openGL for the engine...but i will try gamedev..thanks