I’m trying to validate image file using below method:
if (System.IO.File.Exists("D:\\architecture.png"))
{
using (var streams = new FileStream("D:\\architecture.png",FileMode.Open))
{
bIsValid = Aspose.Imaging.Image.CanLoad(streams);
}
}
I have observed the issue shared by you and request you to please provide the source file reproducing the issue. Please also try setting the stream position to 0 as well before checking.
I have worked with your file using Aspose.Imaging for .NET 19.12 and there is no issue while verifying the stream using Aspose.Imaging. Can you please try using shared project.
I like to share that we can only log issue if it is getting reproduced using latest version. In your case, I suggest you to please try using latest Aspose.Imaging for .NET 19.12 on your end.