Hi
I'm trying to convert a high res PDF file to JPG file, and am noticing that there is no text anti aliasing. See link below.
http://www.imagemagick.org/script/comma ... #antialias
When I run "convert file.pdf file.jpg" and "convert -antialias file.pdf file.jpg" there is no difference between the two files.
Files can be seen in the "imagick" folder here: http://public.me.com/craigfairhurst
How do you turn antialias'ing on? Use a blur perhaps? The text quality is visibly poor in the resulting file, see "imagick" folder above.
Text antialiasing, poor file conversion
Text antialiasing, poor file conversion
ImageMagick 6.5.9-1
GhostScript 8.7
libpng-1.2.43RC1
iMagick 3.0.0RC1
GhostScript 8.7
libpng-1.2.43RC1
iMagick 3.0.0RC1
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Text antialiasing, poor file conversion
use supersampling
convert -density 288 image.pdf -resize 25% image.jpg
density 288=4*72 where 72 is nominal density so resize down by 1/4=25%
convert -density 288 image.pdf -resize 25% image.jpg
density 288=4*72 where 72 is nominal density so resize down by 1/4=25%
Re: Text antialiasing, poor file conversion
Excellent, thanks.
ImageMagick 6.5.9-1
GhostScript 8.7
libpng-1.2.43RC1
iMagick 3.0.0RC1
GhostScript 8.7
libpng-1.2.43RC1
iMagick 3.0.0RC1
Re: Text antialiasing, poor file conversion
Hi
Could do with revisiting this. I've been working with this project since the start of the year and have progressed quite a way with converting between postscript-type files, namely PDFs.
I've already deployed a solution with ImageMagick that outputs JPG's in high quality format from PDF's.
I've noticed however that there are significant differences in the rendering of text compared to images. Images render fine, texts degrade much quicker at lower densities.
I'm aware that the rasterization takes place which is where the problem fundamentally lies, however is there anything more that can be done to make it more smooth for text when being processed? I've noticed particularly at lower densities eg. 92 the text is worse than the images.
Any help would be appreciated.
Could do with revisiting this. I've been working with this project since the start of the year and have progressed quite a way with converting between postscript-type files, namely PDFs.
I've already deployed a solution with ImageMagick that outputs JPG's in high quality format from PDF's.
I've noticed however that there are significant differences in the rendering of text compared to images. Images render fine, texts degrade much quicker at lower densities.
I'm aware that the rasterization takes place which is where the problem fundamentally lies, however is there anything more that can be done to make it more smooth for text when being processed? I've noticed particularly at lower densities eg. 92 the text is worse than the images.
Any help would be appreciated.
ImageMagick 6.5.9-1
GhostScript 8.7
libpng-1.2.43RC1
iMagick 3.0.0RC1
GhostScript 8.7
libpng-1.2.43RC1
iMagick 3.0.0RC1
Re: Text antialiasing, poor file conversion
I don't think that there is an alternative to the supersampling method.
Ghostscript makes the rasterization. You can change the handling of the elements that are antialiased. But some things are simply not antialiased at all with Ghostscript. (I think that normal fonts are antialiased. But other vector graphics are not - or not always?)
Ghostscript makes the rasterization. You can change the handling of the elements that are antialiased. But some things are simply not antialiased at all with Ghostscript. (I think that normal fonts are antialiased. But other vector graphics are not - or not always?)
Re: Text antialiasing, poor file conversion
Possibly yes. I've been looking for an alternative to manage the vector files and haven't come across anything suitable, GIMP on the command line was all that I came across.
ImageMagick 6.5.9-1
GhostScript 8.7
libpng-1.2.43RC1
iMagick 3.0.0RC1
GhostScript 8.7
libpng-1.2.43RC1
iMagick 3.0.0RC1
Re: Text antialiasing, poor file conversion
But what hinders you from using the supersampling method? I think the only disadvantages are an increased processing time - and a bit of blurriness (if the upsampling/downsampling size is not ideal). But the jagged edges of the text will be gone.
If you have problems with specific PDFs, you could upload an example..
If you have problems with specific PDFs, you could upload an example..
Re: Text antialiasing, poor file conversion
Filesize, mainly. Rasterization is an issue however not at low density due to PDFs being for email delivery.
See http://public.me.com/craigfairhurst (the enclosed ZIP file)
See http://public.me.com/craigfairhurst (the enclosed ZIP file)
ImageMagick 6.5.9-1
GhostScript 8.7
libpng-1.2.43RC1
iMagick 3.0.0RC1
GhostScript 8.7
libpng-1.2.43RC1
iMagick 3.0.0RC1
Re: Text antialiasing, poor file conversion
The filesize should stay about the same with supersampling.
Anyway, this method is mainly for vectorial elements that can be rasterized at a higher density and then get downsized (and the downsizing does some sort of antialiasing).
But this last PDF is solely made out of images (already rasterized, stored with a simple RLE compression) - with no (vectorial) text at all. The best thing you can do with such a PDF is to just 'rasterize' it again with the source density (105dpi in your case). You could probably test some things to reduce the jagged edges (blurring or something like that), but personally, I would stay with the unmodified source images. If you resize the 105dpi images to a lower resolution, the jagginess will also be a bit reduced of course.
Example - the 5th page at 105dpi:
http://i41.tinypic.com/5bol0.png
Then resampled to 72dpi:
http://i39.tinypic.com/29gbbf6.png
IMO, there's no automatic way to rasterize various PDFs - at least if you always want a 'perfect' result.
Anyway, this method is mainly for vectorial elements that can be rasterized at a higher density and then get downsized (and the downsizing does some sort of antialiasing).
But this last PDF is solely made out of images (already rasterized, stored with a simple RLE compression) - with no (vectorial) text at all. The best thing you can do with such a PDF is to just 'rasterize' it again with the source density (105dpi in your case). You could probably test some things to reduce the jagged edges (blurring or something like that), but personally, I would stay with the unmodified source images. If you resize the 105dpi images to a lower resolution, the jagginess will also be a bit reduced of course.
Example - the 5th page at 105dpi:
http://i41.tinypic.com/5bol0.png
Then resampled to 72dpi:
http://i39.tinypic.com/29gbbf6.png
IMO, there's no automatic way to rasterize various PDFs - at least if you always want a 'perfect' result.