vicksjaipur
asked on
Getting image file attributes
I want to get height and width of an image file in my vb program. Same value as shown when file is right clicked and properties are viewed in windows and it show hight and width in pixels.
Try this
Dim Pic As StdPicture
Dim PicWidth As Long
Dim PicHeight As Long
Set Pic = LoadPicture("c:\windows\de ll.bmp")
PicWidth = ScaleX(Pic.Width, vbHimetric, vbPixels)
PicHeight = ScaleY(Pic.Height, vbHimetric, vbPixels)
Thanks,
~ fantasy ~
Dim Pic As StdPicture
Dim PicWidth As Long
Dim PicHeight As Long
Set Pic = LoadPicture("c:\windows\de
PicWidth = ScaleX(Pic.Width, vbHimetric, vbPixels)
PicHeight = ScaleY(Pic.Height, vbHimetric, vbPixels)
Thanks,
~ fantasy ~
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
c'mon!, what's the problem here? Fantasy solved the problem, not me.
See https://www.experts-exchange.com/questions/20783388/Converting-StdPicture-Width-to-pixels.html