issue with density parameter

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
RAmbika
Posts: 2
Joined: 2018-03-27T06:45:41-07:00
Authentication code: 1152

issue with density parameter

Post by RAmbika » 2018-03-27T07:01:53-07:00

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.

User avatar
fmw42
Posts: 23993
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: issue with density parameter

Post by fmw42 » 2018-03-27T10:09:04-07:00

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

RAmbika
Posts: 2
Joined: 2018-03-27T06:45:41-07:00
Authentication code: 1152

Re: issue with density parameter

Post by RAmbika » 2018-03-28T02:57:31-07:00

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 ?

User avatar
fmw42
Posts: 23993
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: issue with density parameter

Post by fmw42 » 2018-03-28T09:39:56-07:00

Please provide you variable values so we can test with them.

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

Re: issue with density parameter

Post by snibgo » 2018-03-28T11:43:31-07:00

"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.
snibgo's IM pages: im.snibgo.com

Post Reply