When converting a PDF to JPEG using a custom resolution like in the command below: pdftoppm -jpeg -r 214 in.pdf out the output JPEG does not seem to contain any ppi info (and hence defaults to 72 in most graphic apps). It should retain the custom ppi used in the command to generate it, just like tiff files do with the command: pdftoppm -tiff -r 214 in.pdf out Using Macports' pdftoppm version 0.18.2 from the port poppler @0.18.2 (graphics/poppler)
Created attachment 56136 [details] [review] patch to fix Problem is caused by calling jpeg_set_defaults(&cinfo) after setting the resolution which overwrites the resolution.
Adrian, should the cinfo.in_color_space = colorMode; /* colorspace of input image */ also be after jpeg_set_defaults(&cinfo); ?
(In reply to comment #2) > Adrian, should the > cinfo.in_color_space = colorMode; /* colorspace of input image */ > also be after > jpeg_set_defaults(&cinfo); > ? No. The libjpeg documentation for jpeg_set_defaults() states: "This routine sets all JPEG parameters to reasonable defaults, using only the input image's color space (field in_color_space, which must already be set in cinfo)"
Makes sense then, please commit :-)
Committed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.