Getting image header?

BlitzMax Forums/BlitzMax Programming/Getting image header?

Grisu(Posted 2006) [#1]
Hi all,

Has anyone written an image file header reader yet?
I need get the image width + height without having to load a large image.

JPG or PNG would do fine.

I have done some searching on the forum, but without success.

Grisu


Beaker(Posted 2006) [#2]
Failing that you could just store a tiny binary file with all the sizes for a bunch of images in the same folder.


Dreamora(Posted 2006) [#3]
No I don't think anyone even was interested in it.
If an image is of interest it is normally loaded as png, if it isn't interested, it is not loaded.

Is there any real reason to check a million of images for their sizes? You have "media declaration files" that should give quite a plain description of loading what and when ... so there is no real reason to get such information without loading the rest as well (as that is the largest part of the work anyway ... get to the point to read the header ... the rest of the image can normally be read "for free" after that on todays harddisks & ram)


Grisu(Posted 2006) [#4]
I think Beakers workaround will do nicely.
Sometimes I really think to complicated.

Thanks.