Неровные края при преобразовании файла PNG в PDF с помощью ImageMagick - PullRequest
0 голосов
/ 10 июля 2020

Я конвертирую файлы PNG в PDF, используя ImageMagick, и он отлично работает, но у меня небольшая проблема с некоторыми изображениями, подобными этому:

enter image description here

When converting it with convert fanta-logo.png out.pdf the resulting PDF file looks like this:

enter image description here

There are rough edges on the corners of the image which are not present on the original PNG file. I tried converting PNG to TIFF or JPEG 2000 and then to PDF but the result is the same. Even using Inkscape to convert the PNG file to PDF produces the same result so I'm guessing this is something related to the specific PNG file or to PDF.

Has anyone experienced this? The output from identify is the following:

fanta-logo.png PNG 611x600 611x600+0+0 8-bit sRGB 215227B 0.000u 0:00.000

I'm using IM 7.0.8-64 Q16 on Windows 10 x64. I extracted the alpha channel of the PNG file using convert fanta-logo.png -alpha extract alpha.png and it looks clean:

введите описание изображения здесь

1 Ответ

1 голос
/ 10 июля 2020

У меня отлично работает на IM 6.9.11.23 Q16 Ma c OSX с libpng 1.6.37.

convert fanta.png fanta.pdf

fanta.pdf

Какая у вас версия IM и версия libpng? Возможно, вам нужно обновить один или оба.

...