Hello!
I have an issue with opening some of TIFF files with Aspose.Imaging when trying to convert it to PDF.
I use Aspose.Imaging 24.12 for .NET and following code:
using (var image = Aspose.Imaging.Image.Load(SourcePath))
{
saveOptions = new Aspose.Imaging.ImageOptions.PdfOptions();
saveOptions.UseOriginalImageResolution = true;
image.Save(TargetPath, saveOptions);
}
When i try to open this file
Letter.zip (714.5 KB), an error occurs:
Aspose.Imaging.CoreExceptions.ImageLoadException
HResult=0x80131500
Message=Image loading failed.
Source=Aspose.Imaging
StackTrace:
at Aspose.Imaging.Image.(StreamContainer , LoadOptions )
at Aspose.Imaging.Image.Load(String filePath)
Inner exception is:
Unable to read file. Exception: Invalid requested xml: <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1-701"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/">
</rdf:Description>
<rdf:Description rdf:about="" xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/">
<xmpRights:Marked>True</xmpRights:Marked></rdf:Description>
</rdf:RDF></x:xmpmeta><?xpacket end="w"?>
endstream
endobj
96 0 obj
[ 0[ 750] 3[ 278] 11[ 333 333] 14[ 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 278] 35[ 1015] 40[ 667] 66[ 556] 68[ 556] 70[ 500 556 556 278] 75[ 556 222] 79[ 222 833 556 556 556] 85[ 333] 87[ 278 556] 90[ 722] 169[ 556 556] 570[ 667 656 667 542 677] 578[ 719] 580[ 583] 582[ 833 722 778 719 667 722 611 635] 592[ 740] 599[ 719] 602[ 556 573 531 365 583 556 669] 610[ 559 559 438 583 688 552 556 542 556 500 458 500 823 500 573 521 802] 630[ 521] 633[ 542] 651[ 1073] ]
endobj
97 0 obj
<</Filter/FlateDecode/Length 40>>
stream
x����G���A���0��@*����h���#aT
File opens normally with Windows Photo Viewer, so it seems that it isn’t broken, but Aspose.Imaging can’t handle it.
I’d like to know how this might be fixed, could you please give me some clues to achieve it?