Replies: 2 comments
-
Given that PDFSharpCore is referencing an entire major version behind the current one I couldn’t possibly comment. I would attempt to decode the image directly using the latest v3 version and if there’s still a problem raise an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you @JimBobSquarePants for your quick response. The latest version behaves in the same way as version 2.1.8.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a jpg image (JFIF) that uses grayscale (has one color component according to exiftool).
I use PdfSharpCore to add this image to a pdf document. The current version of PdfSharpCore uses ImageSharp v 1.0.4.
Everything works well but in order to fix the vulnerabilities in ImageSharp v1.0.4 I've updated the ImageSharp nuget to version 2.1.8. Now the generated pdfs can't be displayed ("Insufficient data for an image") and the problem seems to be that in version 1.0.4 my image was automatically converted to use 3 color components and that works well when inserting the image to a pdf document using ColorSpace DeviceRGB. But starting with version 2.0.0 my image is not automatically converted and it keeps the single color component. PdfSharp keeps using DeviceRGB as ColorSpace and the generated pdf do not work . Is this a intended change in ImageSharp version 2.0.0?
Beta Was this translation helpful? Give feedback.
All reactions