Hello,
I'm converting PDFs to sequences of JPGs.
Images inside the PDF are not rendered well. I think there is some problem in scaling, and artifacts appears.
Below is an explaining image with two portiong of a JPG obtained from PDF.
On the left side the result is from Photoshop. On the right from ImageMagick (look at diagonal lines)
The issued command that generated the PDF with ImageMagick was
convert -colorspace sRGB -quality 92 -density 75 -strip /Users/paolo/Desktop/test/test.pdf /Users/paolo/Desktop/test/test.jpg
(In case it may be usefull to know: the image inside the PDF, is CMYK, 90 dpi, with Jpeg compression, so ImageMagick is actually performing a downsample).
Kind regards,
Paolo.
Converting PDF to JPG: problem w/images inside the PDF
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Converting PDF to JPG: problem w/images inside the PDF
try increasing the density
Re: Converting PDF to JPG: problem w/images inside the PDF
To increase the quality of the PDF rendering, supersample:
- convert -colorspace sRGB -quality 92 -density 300 -strip /Users/paolo/Desktop/test/test.pdf -resize 25% /Users/paolo/Desktop/test/test.jpg
Re: Converting PDF to JPG: problem w/images inside the PDF
I have the same issue converting a pdf file to a png file with the command:
The resulting PNG has some mis-coloured pixels, which are unwanted, and the PDF only contains vector graphics.
The DF file is available here:
https://dl.dropboxusercontent.com/u/587 ... adient.pdf
and was generated from following LaTeX/TikZ code with pdflatex:
using an even higher depth and scaling that back gets rid of the artifacts though that shouldn't be necessary, also, it uses a lot more memory and results in a relatively much larger file:
Code: Select all
convert -density=1800 testgradient.pdf testgradient.png
The DF file is available here:
https://dl.dropboxusercontent.com/u/587 ... adient.pdf
and was generated from following LaTeX/TikZ code with pdflatex:
Code: Select all
\documentclass{standalone}
\pagestyle{empty}
\usepackage{tikz}
\usetikzlibrary{shadings}
\begin{document}
\begin{tikzpicture}
\coordinate (center) at (0,0);
\shade[shading=color wheel] (center) circle (1);
\end{tikzpicture}
\end{document}
Code: Select all
convert -density 7200 -resize 25% testgradient.pdf testgradient.png
Re: Converting PDF to JPG: problem w/images inside the PDF
We get expected results. We're using ImageMagick 6.8.9-5, the current release, and Ghostscript 9.14.
Re: Converting PDF to JPG: problem w/images inside the PDF
You are right, I can't reproduce this anymore. Sorry for the noise.