c# 4.0 - How to get dimensions of image without loading the image -


I think I'm asking for the impossible, but ask anyway ...
I have a folder Many subfolders) that have lots of images in JPG and PNG formats. And I need a device that creates a list of files, including their dimensions (width and height.) I have to do this, I can just read, I can load the bitmap image and width / height properties. It would be fine if the images themselves were not so great ...
standard image size is approximately 8 megapixels, but is approximately between 10% to 40 and 100 megapixel (yes, it is 10,000x10,000 pixels.) This means That is, I am dealing with PNG files of 50 to 100 MB each. With a total of 7,500 images it means that my tool is too busy reading lots of file data.
I need a fast way to read the dimensions of these file types Memory is not due to use, because my system has 32 GB of RAM, but because I do not want to wait 45 minutes for the index ... (Well, a bit of an exaggeration, but it is not fast.)

you have a full article and working code in the following link (Kodprojekt).

She is reading header information to get the dimensions of the image. The display looks good.


Comments