?
Solved

Getting image file attributes

Posted on 2003-10-31
4
Medium Priority
?
212 Views
Last Modified: 2010-05-03
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
Comment
Question by:vicksjaipur
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Expert Comment

by:James20000
ID: 9657836
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
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9658037
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
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 400 total points
ID: 9658491
Fantasy is right :)
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9984418
c'mon!, what's the problem here? Fantasy solved the problem, not me.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 22 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question