sungaila / PDFtoImage

A .NET library to render PDF files into images.
https://www.sungaila.de/PDFtoImage/
MIT License
176 stars 19 forks source link

Color was not correct #17

Closed leeichang closed 1 year ago

leeichang commented 2 years ago

I use PDFtoImage to Convert PDF file first page to PNG image This is the original Pdf screenshot.

Original Pdf screenshot

This is the convert result Convert Image This is the original Pdf file 322145774-Coca-Cola-by-Group-5.pdf You can see the color was not right. How can I fix it? Here is my code

            using var inputStream = new FileStream(inputFile, FileMode.Open, FileAccess.Read);
            string outputPath = Path.Combine(outputFolder, outputFileName + "_200.png");
            Conversion.SavePng(outputPath, inputStream, null, 0, 600, 200, 200);
sungaila commented 2 years ago

Hi @leeichang,

thank you for opening this issue! Can you please tell me on which platform (Windows, Linux, macOS, Android) and architecture (x86, x64, ARM64) you have tested this?

leeichang commented 2 years ago

I used macOS M1 ARM64 but Windows x64 the same, I have both Mac M1 and Hp Windows 10 notebook. I give up to used PdfToImage and used https://github.com/Belval/pdf2image to do pdf to image work and it was fine. Dotnet core worked fine with python.