Skip to content

PNG Loading Failure in PdfSharp After Installing System.Formats.Nrbf and System.Resources.Extensions Libraries #368

@thiagosdrv

Description

@thiagosdrv

After installing the System.Formats.Nrbf version 10.0.8 or System.Resources.Extensions version 10.0.8 libraries, an "Unsupported image format" exception occurs when using the PdfSharp.Drawing.XImage.FromFile("PNG_File_Folder") method or the XImage.FromStream method in PDFSharp version 6.2.4.

The PNG file is processed correctly when these libraries are not present. Without System.Formats.Nrbf and System.Resources.Extensions, the image is successfully added to the PDF and works as expected.
However, after installing these libraries, the call to PdfSharp.Drawing.XImage.FromFile("PNG_File_Folder") starts failing with the "Unsupported image format" error.

The image is a small file, an icon of approximately 1 KB. I also tested converting the image to 8-bit and 16-bit formats, but unfortunately the issue persisted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions