Im wondering if its possible to find out the size (width and height) of a PNG image without having to load it. Right now, im loading the images and then calculating how many frames the image has (width/32), after that I load the image as animated.
Right now that doesn't pose a problem, as Im only doing that for 5 images, but once I have more, it may slow down.
So, anyone know of a way I can quickly extract the size of the image? Im gonna try to find out the structure of PNGs a bit.
EDIT: Doing some tests, and I found a pattern, it appears (possibly just luck) that width is kept on byte 20?
|