[.net] "Image" processing

Started by
3 comments, last by lucinpub 18 years, 3 months ago
Hello everyone, long time no post. Got a quick (hopefully) question. It's not really image processing. I need to process thousands of image files and one of the early steps is to look at the height and width of the image. At this point that is all I need from the file. Right now, my code just loads the file into a Bitmap using Bitmap.FromFile( string path ) and then queries the height and width. This is much too slow (some of the files are pretty large). Does anyone know a quicker way to get this info from an image file? My google search hasn't given me anything useful yet. Any help is appreciated. thanks
Lucas Henekswww.ionforge.com
Advertisement
If you can use Managed DirectX, you can try TextureLoader.GetImageInformationFromFile().

HTH,
Pat.
Unfortunately no, vanilla .net 2.0 framework only. Good suggestion though, thanks.
Lucas Henekswww.ionforge.com
A more drastic approach would be implementing your own image reader - it would only need to be able to identify the most common file formats and know how to read the properties you are interested in.
Sites like Wotsit have lots of information about common image file formats.

Good luck and let me know if you need help with that,
Pat.
yeah, thats what I was thinking, but I'm hoping there is some api call out there so I dont have to bother with all that. If it comes to that, Ill be able to handle it fine, I just have so much other code to write I don't want to add too much more :)
Lucas Henekswww.ionforge.com

This topic is closed to new replies.

Advertisement