This code
Dim vImageFlag As Integer = 0
If System.IO.File.Exists(Row("Image")) Then
vImageFlag = 1
Dim vDirectories = MetadataExtractor.ImageMetadataReader.ReadMetadata(Row("Image"))
Dim vSub = vDirectories.OfType(Of MetadataExtractor.Formats.Exif.ExifIfd0Directory)().FirstOrDefault
If Not vSub Is Nothing Then
Dim vOrientationObj = vSub.GetObject(MetadataExtractor.Formats.Exif.ExifDirectoryBase.TagOrientation)
If Not vOrientationObj Is Nothing Then
If Not vOrientationObj.Equals(DBNull.Value) Then
vOrientationNumber = Convert.ToInt16(vOrientationObj)
vOrientationFlag = 1
End If
End If
End If
For Each vDirectory In vDirectories
vEXIF += vDirectory.Name & vbCr
For Each vTag In vDirectory.Tags
vEXIF += vbTab & " " & vTag.Name & " " & vTag.Description & vbCr
IsEXIF = 1
Next
Next
End If
works fine on some pages but blows out with others at
Dim vSub = vDirectories.OfType(Of MetadataExtractor.Formats.Exif.ExifIfd0Directory)().FirstOrDefault
At all times there is an image at the path
Really stumped on this one - but it's probably staring me in the face :-)
Thank you
Stacktrace
StackTrace:
at Microsoft.VisualBasic.CompilerServices.Symbols.Container.GetMembers (String& MemberName, Boolean ReportErrors)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at HOAManagerClient051.MultiViolations_Page._Closure$__13-0._Lambda$__4() in C:\Path\HOAManagerClient051\HOAManagerClient051\Pages\Board\Violations\MultiViolations_Page.xaml.vb:line 822
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()