Page 1 of 1

issue with density parameter

Posted: 2018-03-27T07:01:53-07:00
by RAmbika
while converting .png files to .pdf format, with density parameter, the output does not match source image dimension(the image is very small).
please let us know what is density parameter and how can we use it to get the output with the proper image dimensions.

Re: issue with density parameter

Posted: 2018-03-27T10:09:04-07:00
by fmw42
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown

Re: issue with density parameter

Posted: 2018-03-28T02:57:31-07:00
by RAmbika
IM version - 7.0.7-21
Platform - Windows
Command - convert.exe %inputfile% %scaleto% %density% %outputfile%

Please find the original image here :
https://www.dropbox.com/s/d1gds4z9wtrrj ... e.png?dl=0
input file dimensions : 6.03 x 3.11 inches

the output pdf with the above command:
https://www.dropbox.com/s/n0rv5xarg7k4r ... 0.pdf?dl=0
output file dimensions : 1.14 x 0.59 inches

the output file dimensions does not match input source file. Could you please let us know what is causing this issue, and how can we resolve this ?

Re: issue with density parameter

Posted: 2018-03-28T09:39:56-07:00
by fmw42
Please provide you variable values so we can test with them.

Re: issue with density parameter

Posted: 2018-03-28T11:43:31-07:00
by snibgo
"identify -verbose" tells me the input density is 37.79 PixelsPerCentimeter. We can use that to make the PDF:

Code: Select all

convert google.png -density 37.79 -units pixelspercentimeter x.pdf
Acording to Adobe Reader, x.pdf is the required 6.03 x 3.11 inches.