Link to home
Start Free TrialLog in
Avatar of vicksjaipur
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.
Avatar of James20000
James20000

I have the same problem / question!   I need image width and height in pixels in VB.

See https://www.experts-exchange.com/questions/20783388/Converting-StdPicture-Width-to-pixels.html
Try this
    Dim Pic As StdPicture
    Dim PicWidth  As Long
    Dim PicHeight As Long
   
    Set Pic = LoadPicture("c:\windows\dell.bmp")
   
    PicWidth = ScaleX(Pic.Width, vbHimetric, vbPixels)
    PicHeight = ScaleY(Pic.Height, vbHimetric, vbPixels)

Thanks,
~ fantasy ~
ASKER CERTIFIED SOLUTION
Avatar of Richie_Simonetti
Richie_Simonetti
Flag of Argentina image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
c'mon!, what's the problem here? Fantasy solved the problem, not me.