|
-
June 18th, 2006, 06:50 AM
#1
Get image dimensions
When I mouse over image files in Explorer, the dimensions of the image along with file size display in a tooltip popup.
Is there a simple command that will provide the dimensions of an image file given the path of the image file?
-
June 18th, 2006, 07:29 AM
#2
Re: Get image dimensions
 Originally Posted by Bob H
When I mouse over image files in Explorer, the dimensions of the image along with file size display in a tooltip popup.
Is there a simple command that will provide the dimensions of an image file given the path of the image file?
What kind of Images? If you deal with bmp you can use ::LoadImage() and ::GetObject() ( look at this thread for sample ).
If you need to deal with other image formats i can suggest you to use Image Class of GDI+.
Cheers
-
June 19th, 2006, 07:38 AM
#3
Re: Get image dimensions
All image formats (jpg, gif, png, etc).
I believe that GDI+ only comes with Windows XP. I don't want to have to dramatically alter my program and installation to simply get image dimensions.
-
June 19th, 2006, 07:41 AM
#4
Re: Get image dimensions
 Originally Posted by Bob H
All image formats (jpg, gif, png, etc).
I believe that GDI+ only comes with Windows XP. I don't want to have to dramatically alter my program and installation to simply get image dimensions.
In that case you will need to find lib(s) that know(s) how to handle different image file formats.
Look at CxImage it might give you good start.
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|