我创建了一个 tiff 查看器,它已经可以查看 tiff 图像。除非它是像 1200 DPI 这样的高分辨率。我的代码中是否有导致问题的解决方法?
Public Function GetTiffImage(path As String, page As Integer) As Image
Dim ms As MemoryStream = Nothing
Dim SrcImg As Image = Nothing
Dim returnImage As Image = Nothing
Try
SrcImg = Image.FromFile(path)
ms = New MemoryStream()
Dim FrDim As New FrameDimension(SrcImg.FrameDimensionsList(0))
SrcImg.SelectActiveFrame(FrDim, Page)
SrcImg.Save(ms, ImageFormat.Tiff)
returnImage = Image.FromStream(ms)
Catch ex As Exception
Throw ex
Finally
SrcImg.Dispose()
GC.Collect()
GC.WaitForPendingFinalizers()
End Try
Return returnImage
End Function
提前致谢