Image dimesions?

Dream Master
01-07-2005, 06:53 AM
Does anybody know how to find the dimesions of an image? (the width and height of any or most picture formats)

01-07-2005, 07:49 AM
If you load it into a STDPicture object then you can access the Width and Height properties. Sure, they're given in a unit called HiMetrics, but it is possible to convert them to pixels.

Hope this helps :)

Dream Master
01-07-2005, 10:39 AM
How do you get there STDPicture object? also is that only pure coding, because that's what I need. Thanks

01-07-2005, 11:10 AM
You use it similar to this:

Dim pic As StdPicture
Set pic = LoadPicture("Any File Name of a Valid Picture")
MsgBox Me.ScaleX(pic.Width, vbHimetric, vbPixels) & " x " & Me.ScaleX(pic.Height, vbHimetric, vbPixels) & " pixels"

Basically I've used the Form object's built in abilities to convert between different scalemodes. It might be cheating a bit, but it gives you the idea :)

Dream Master
01-07-2005, 02:08 PM
How would you put that in a com object?
In my code the me.scalex doesn't work.

Dream Master
01-07-2005, 02:45 PM
BTW I am trying to make a COM object for asp.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum