0

Windows Explorer gives extended information of pictures such as Width, Height, Manufacturer, Cameramodel, Exposuretime, Picture made on, Date created, Date changed and so on.

How to get access to these parameters in VB6.0?

Thanks in advance
Kees Baltus

2
Contributors
6
Replies
7
Views
10 Years
Discussion Span
Last Post by PVBert
0

Windows Explorer gives extended information of pictures such as Width, Height, Manufacturer, Cameramodel, Exposuretime, Picture made on, Date created, Date changed and so on.

How to get access to these parameters in VB6.0?

Thanks in advance
Kees Baltus

Keywords:
EXIF Exchangeble Image File Format
IPTC Interantional Press Telecommunications Council
WIA Windows Image Acquisition
Information sites:
http://msdn2.microsoft.com/en-us/library/ms630818.aspx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wiaaut/wia/wiax/overviews/sharedsamples.asp

Solution:
1. Download "WIAaut.dll" (see http://www.ilixis.com/developer/wia.html)
2. Register wiaaut.dll
3. Project-References Microsoft Windows Image Acquisition Library v2.0
4. Put Commondialog Tool on form
5. Add the next code
Dim Img 'As ImageFile
Dim IP 'As ImageProcess
Dim v 'As Vector
Dim p 'As Property
Dim i 'As Integer
Set Img = CreateObject("WIA.ImageFile")
Set IP = CreateObject("WIA.ImageProcess")
Set v = CreateObject("WIA.Vector")
Img.LoadFile "C:\135_3501.jpg"
For Each p In Img.Properties
Dim s 'As String
s = p.Name & "(" & p.PropertyID & ") = "
If p.IsVector Then
s = s & "[vector data not emitted]"
ElseIf p.Type = RationalImagePropertyType Then
s = s & p.value.Numerator & "/" & p.value.Denominator
ElseIf p.Type = StringImagePropertyType Then
s = s & """" & p.value & """"
Else
s = s & p.value
End If

0

img.LoadFile "C:\Yvonne.jpg"
If img.Properties.Exists("36867") Then
Set f = fs.GetFile("c:\Yvonne.jpg")
MsgBox "Date of original = " & img.Properties("36867").Value
MsgBox img.FileExtension
MsgBox img.FrameCount
Else
Set f = fs.GetFile("c:\Yvonne.jpg")
MsgBox "Datecreated = " & f.DateCreated
End If

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.