Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I'm trying to use the exiflib library

i have this code

VB
Dim reader As ExifReader
     reader = New ExifReader(naam)
     Dim latitudeDMS As Double
     Dim longitudeDMS As Double
     Dim longitudeRef As String
     Dim latitudeRef As String
     Dim dateTaken As DateTime
     Dim succes As Boolean

     succes = reader.GetTagValue(ExifTags.GPSLatitude, latitudeDMS)
     succes = reader.GetTagValue(ExifTags.GPSLongitude, longitudeDMS)
     succes = reader.GetTagValue(ExifTags.GPSLatitudeRef, latitudeRef)
     succes = reader.GetTagValue(ExifTags.GPSLongitudeRef, longitudeRef)
     succes = reader.GetTagValue(ExifTags.DateTimeDigitized, dateTaken)



with the first 2 statements
succes = reader.GetTagValue(ExifTags.GPSLatitude, latitudeDMS)
succes = reader.GetTagValue(ExifTags.GPSLongitude, longitudeDMS)

I get this error

An unhandled exception of type 'System.InvalidCastException' occurred in ExifLib.dll

Additional information: Specified cast is not valid.

the other 3 statements work fine.
What am I doing wrong? is double the wrong type ? or is there a problem in the exiflib library?


many thanks in advance

Schenck
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900