0

这段代码

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

在某些页面上可以正常工作,但在其他页面上却很糟糕

Dim vSub = vDirectories.OfType(Of MetadataExtractor.Formats.Exif.ExifIfd0Directory)().FirstOrDefault

在任何时候都有一个图像在路径 调试

真的难倒这个 - 但它可能正盯着我的脸:-)

谢谢

错误点

堆栈跟踪

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()
4

0 回答 0