Command line: set density to get cm without resizing
Posted: 2018-09-24T09:28:45-07:00
<t>Hello<br/>
<br/>
I have joined the ImageMagick discourse today – hello everybody.<br/>
<br/>
I make screenshots of line graphics, trim them with ImageMagick and paste them into a Word document.<br/>
I would like to set the density to get the desired width in centimeters without changing the size in pixels. This means that I will set meta data without touching the pixels.<br/>
Is there a single-line command line that reads the width and calculates the density? Something like this to get a width of 7.7cm:<br/>
<br/>
magick convert clipboard: -units PixelsPerCentimeter -density '(%w/7.7)' clipboard:<br/>
<br/>
How do I have to write it correctly?<br/>
<br/>
I have found other posts, but I have not found any single-line examples.<br/><br/>
Thanks in advance.<br/>
stringeater<br/><br/>
Version: 7.0.8-11 Q16 x86 2018-09-29 / Windows 10</t>
<br/>
I have joined the ImageMagick discourse today – hello everybody.<br/>
<br/>
I make screenshots of line graphics, trim them with ImageMagick and paste them into a Word document.<br/>
I would like to set the density to get the desired width in centimeters without changing the size in pixels. This means that I will set meta data without touching the pixels.<br/>
Is there a single-line command line that reads the width and calculates the density? Something like this to get a width of 7.7cm:<br/>
<br/>
magick convert clipboard: -units PixelsPerCentimeter -density '(%w/7.7)' clipboard:<br/>
<br/>
How do I have to write it correctly?<br/>
<br/>
I have found other posts, but I have not found any single-line examples.<br/><br/>
Thanks in advance.<br/>
stringeater<br/><br/>
Version: 7.0.8-11 Q16 x86 2018-09-29 / Windows 10</t>