Problem with antialias when converting PDF to Images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
LittleKI
Posts: 32
Joined: 2015-01-11T11:55:29-07:00
Authentication code: 6789

Problem with antialias when converting PDF to Images

Post by LittleKI » 2017-01-15T04:57:58-07:00

Hi,

i use this command line

Code: Select all

convert -density 300x300 -units pixelsperinch input.pdf -background white -alpha background -alpha off -compress zip +adjoin output.tiff
to convert PDF into Images. This works good for teh most files. But there is a problem with antialias (i think). When i zoom in the output image i see that the letters in the tiff image don't have so straight edges as in the pdf file. here is a example, the left is the pdf, the right the tiff: Datei von filehorst.de laden (The website is in german in my browser, i hope there is a english version when the system language is set to english).

as i could read here http://www.imagemagick.org/Usage/antialiasing/ antialias should be enable by default.
Last edited by LittleKI on 2017-01-15T05:29:27-07:00, edited 2 times in total.

snibgo
Posts: 12286
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problem with antialias when converting PDF to Images

Post by snibgo » 2017-01-15T05:20:40-07:00

Anti-aliasing is implemented in alpha, which you turn off, so you remove anti-aliasing. Try this:

Code: Select all

convert in.pdf -background White -layers flatten out.png
snibgo's IM pages: im.snibgo.com

LittleKI
Posts: 32
Joined: 2015-01-11T11:55:29-07:00
Authentication code: 6789

Re: Problem with antialias when converting PDF to Images

Post by LittleKI » 2017-01-15T05:35:40-07:00

This creates one tiff file with all sites of the pdf document in that one tiff.

snibgo
Posts: 12286
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problem with antialias when converting PDF to Images

Post by snibgo » 2017-01-15T05:37:23-07:00

Then use "+adjoin".
snibgo's IM pages: im.snibgo.com

LittleKI
Posts: 32
Joined: 2015-01-11T11:55:29-07:00
Authentication code: 6789

Re: Problem with antialias when converting PDF to Images

Post by LittleKI » 2017-01-15T05:54:28-07:00

Result is the same with +adjoin

Code: Select all

convert -density 200x200 -units pixelsperinch input.pdf -background White -layers flatten -compress zip +adjoin output.tiff
But alos without '-alpha off' the result isn't very good when i zoom in the output tiff. For that i tried this command line

Code: Select all

convert -density 200x200 -units pixelsperinch input.pdf -compress zip +adjoin output.tiff
and this

Code: Select all

convert -density 200x200 -units pixelsperinch input.pdf -antialias -compress zip +adjoin output.tiff

snibgo
Posts: 12286
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problem with antialias when converting PDF to Images

Post by snibgo » 2017-01-15T06:06:35-07:00

What version of IM are you using? What version of Ghostscript? Please post a link to input.pdf.
snibgo's IM pages: im.snibgo.com

LittleKI
Posts: 32
Joined: 2015-01-11T11:55:29-07:00
Authentication code: 6789

Re: Problem with antialias when converting PDF to Images

Post by LittleKI » 2017-01-15T06:24:24-07:00

i've tested this with this free eBook: http://freebooks.pupilgarage.com/FreeBo ... bookid=201

My IM-Version is

Code: Select all

8:6.8.9.9-7ubunt
and Ghostscript is

Code: Select all

9.18~dfsg~0-0ubu

snibgo
Posts: 12286
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problem with antialias when converting PDF to Images

Post by snibgo » 2017-01-15T06:40:26-07:00

Does this do what you want:

Code: Select all

convert -density 200 -units pixelsperinch -background White A_Christmas_Carol_NT.pdf -compress Zip +adjoin acc.tiff
snibgo's IM pages: im.snibgo.com

LittleKI
Posts: 32
Joined: 2015-01-11T11:55:29-07:00
Authentication code: 6789

Re: Problem with antialias when converting PDF to Images

Post by LittleKI » 2017-01-15T08:56:59-07:00

The same bad results.

Post Reply