Solved

Getting image file attributes

Posted on 2003-10-31
4
209 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 100 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

Technology Partners: 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!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

726 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