Trying to quickyly get the size of an image file under windows, want to scan a list of files and get their height/width, any ideas how to do this.
Did a search found some old code using IMAGEINFO, but it no longer works, try this link.
viewtopic.php?t=3638&highlight=imageinfo
Thanks
How to find the height/width for gif or jpg file
Hi Jose:
You can try ImageWidth() and ImageHeight() for BMP,JPG, PNG, TIFF and TGA images.
Hope this helps
Regards
Einander
You can try ImageWidth() and ImageHeight() for BMP,JPG, PNG, TIFF and TGA images.
Code: Select all
UseJPEGImageDecoder()
UsePNGImageDecoder()
UseTIFFImageDecoder()
UseTGAImageDecoder()
;__________here start a loop
LoadImage(0, "c:\test.jpg") ; ********here your images**********
Debug ImageWidth()
Debug ImageHeight()
FreeImage(0)
;_________end loop
Regards
Einander
Thanks einander, I figured that one out after doing some testing, but what I really wanted was a windows API way to tell the height/width of any image, I just want the info, dont need to use the image files.
Anyone know how to use API GetImageInfo() or something like it to get image file height/width.
Anyone know how to use API GetImageInfo() or something like it to get image file height/width.