PNG images are converted to JPG and lose quality

Hi,

I’m adding some PNG images to a PDF Document. When looking at the PDF output it seems the PNG’s have been converted to JPG by aspose. I say this because the images show distinct JPG distortion that I can reproduce when I convert the PNG image to JPG myself. Is there some way around this? I would like the image to be stored in a lossless format. thanks!

some extra info: we are on version 16.12. I checked the release notes and only bug PDFNET-38517 might be related, but I can’t find any extra info on that ticket.

@mathieu2,

Aspose.PDF API cannot export images and you can use Aspose.Imaging API for this purpose. Please refer to this help topic: Exporting Images. Kindly send all details of the scenario, including source PNG, PDF and code. We will investigate your scenario in our environment, and then share our findings with you.

Hi Imran,

thank you for your quick response. To clarify, I am not trying to export images. Rather, my goal is to create a PDF document from scratch that includes some high resolution generated images. The problem is that Aspose PDF, at least in version 16.12, does not render the image in its original form. Instead, it appears that the library always converts images to JPG format to include in the PDF. That might be fine for photographs but in my case the generated images are charts. The image artifacts that are introduced by the conversion to JPG are noticeably in the resulting PDF. So my question is: is there some way to prevent aspose PDF from converting the image to JPG?

@mathieu2,

We have tried with the latest version 18.3 of Aspose.PDF for .NET API and it does not convert PNG images to JPEG. Kindly send all details of the scenario (including input documents and code), so that we could investigate in our environment. Your response is awaited.