|
|
Rank: Advanced Member Groups: Member
Joined: 3/3/2008 Posts: 47 Points: 141
|
I just try to upgrade the component from 4.5 to 5.0.
I found that i gave error on this line of code tmpDateString = exifData.Item(Aurigma.GraphicsMill.Codecs.ExifDictionary.DateTimeOriginal)
The error as below: Run-time exception thrown : System.ArgumentException - The value with the specified key does not exist in collection. Parameter name: key
The code was working fine under 4.5
Please advice.
|
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 8/3/2003 Posts: 586 Points: 588
|
Hello,
Could you attach the image file causing the problem?
Sincerely yours, Dmitry Sevostyanov.
|
|
Rank: Advanced Member Groups: Member
Joined: 3/3/2008 Posts: 47 Points: 141
|
Code:18: Dim formatReader As Codecs.IFormatReader 19: formatReader = Codecs.FormatManager.CreateFormatReader(strFileName) 20: Dim exifData As Codecs.MetadataDictionary
21: Select Case formatReader.MediaFormat Case Codecs.FormatManager.JpegFormat 22: Dim jpegReader As Codecs.JpegReader 23: jpegReader = CType(formatReader, Codecs.JpegReader) 24: exifData = jpegReader.Exif
25: Case Codecs.FormatManager.PsdFormat 26: Dim psdReader As Codecs.PsdReader 27: psdReader = CType(formatReader, Codecs.PsdReader) 28: exifData = psdReader.Exif
29: Case Codecs.FormatManager.TiffFormat 30: Dim tiffReader As Codecs.TiffReader 31: tiffReader = CType(formatReader, Codecs.TiffReader) 32: exifData = tiffReader.Exif 33: Case Else 34: Exit Function 35: End Select
36: Dim tmpDateString As String = "" 37: Try tmpDateString = _ Format(exifData.Item(Aurigma.GraphicsMill.Codecs.ExifDictionary.DateTimeOriginal), yyyy-mm-dd HH:mm:ss") <- this is where give error ' 39: Catch ex As Exception tmpDateString = "1601-01-01 00:00:01" 40: End Try File Attachment(s):
Output.jpg (1,431kb) downloaded 1 time(s).
|
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 1/31/2005 Posts: 386 Points: 403
|
Hello, The file you sent doesn't contain such EXIF tag. You should add additional check before using this value using Contains(...) method.
Best wishes, Alex.
|
|
Rank: Advanced Member Groups: Member
Joined: 3/3/2008 Posts: 47 Points: 141
|
Thanks !!!
|
|
|
Guest |