Unexpected borders between white object and background when converting PDF to PNG
Posted: 2018-06-21T20:48:00-07:00
Consider the following conversion from PDF to PNG:
Source PDF: http://www.vanr.nl/ImageMagick/test.pdf
Result: Unexpected borders or "nasty edges" (as I call them) appear between the white circle and the background. There are no such edges between the circle and the white square located behind the circle:

The "nasty edges" disappear when running the same code extended with the option...
...removing all anti-aliasing. Result:

Question: How can "nasty edges" be removed without removing anti-aliasing? I am a beginner at IM.
I searched, but found no solution. Sorry about the big images: I cannot get the BBCode to scale them down.
Version: 7.0.8-2 Q16 x64 2018-06-18
Source PDF: http://www.vanr.nl/ImageMagick/test.pdf
Code: Select all
mogrify.exe -density 900 -units PixelsPerInch -flatten -format png test.pdf

The "nasty edges" disappear when running the same code extended with the option...
Code: Select all
+antialias

Question: How can "nasty edges" be removed without removing anti-aliasing? I am a beginner at IM.
I searched, but found no solution. Sorry about the big images: I cannot get the BBCode to scale them down.
Version: 7.0.8-2 Q16 x64 2018-06-18