empira / PDFsharp

PDFsharp and MigraDoc Foundation for .NET 6 and .NET Framework
https://docs.pdfsharp.net/
Other
499 stars 121 forks source link

XGraphics.DrawImage() PNG image without transparency #187

Open NintendoPlayer opened 2 days ago

NintendoPlayer commented 2 days ago

Hi.

I upgraded my project to NET.8 and installed 6.2.0-preview-1. Besides some changes, everything works fine. I'm having a weird issue with this version.

I load a png image from a database, then I save it to a memorystream. I save it to an XImage object and then draw it to the last page of the pdf.

With the old 1.51 library, the png retained the transparency. Now the png draws with white background thus hidding the objects behind it.

ThomasHoevel commented 1 day ago

Would be good to know which version of PDFsharp you are using and would be good to have the PNG file for testing.

https://docs.pdfsharp.net/General/Issue-Reporting.html

NintendoPlayer commented 1 day ago

Hi! Version is 6.2.0-preview 1, is on the first message About the png file is a signature so I will try with another file to see if the issue persist.

ThomasHoevel commented 1 day ago

Would be good to know which version of PDFsharp you are using: Core, GDI, or WPF. But that only matters if we also get the PNG file.