Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

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.
0
vicksjaipur
Asked:
vicksjaipur
  • 2
1 Solution
 
James20000Commented:
I have the same problem / question!   I need image width and height in pixels in VB.

See www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20783388.html
0
 
fantasy1001Commented:
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 ~
0
 
Richie_SimonettiCommented:
Fantasy is right :)
0
 
Richie_SimonettiCommented:
c'mon!, what's the problem here? Fantasy solved the problem, not me.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now