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

Recommended Answers

All 6 Replies

maybe the filesystem object has these properties

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

Forgot to mention that I found a solution for my problem

Which is?

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

thanks ;-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.