fetch jpeg image dimension without load it
I want to know image dimension but I can't use Image.FromFile method to load image file because it is very slow and I want get image dimention quickly.
my image file format is JPEG
i will thank every one help me
(excuse me i can't speak english correctly)
mostafaPosted Jul 4, 2007, 9:50 AM
Jan MontanoPosted Jul 3, 2007, 9:58 PM
One option is having a look for "JPEG Library". I once used it in picture comparisons in a machine problem. But it's written in either C or C++ (can't remember). You could understand more the sturcture of a JPEG file by researching this API. If you're really up to speed, maybe you could take a look.
If I remember it correctly, the dimension is also listed in the jpeg header. Perhaps you could just have a binary read of the file and parse the dimension information. But then again, you may still have to open the file to be able to read.