[magick-users] strange behavior of -density

Anthony Thyssen A.Thyssen at griffith.edu.au
Sun Oct 18 18:51:40 PDT 2009


On Sun, 18 Oct 2009 17:31:21 +0800
jinsong zhao <snoopy00001 at gmail.com> wrote:

| Hi there,
| 
| I use `convert' to convert some figure in tiff format (in 300dpi) to png
| with lower resolution:
| 
| convert -density 30 -resize 10% input.tiff output.1.png
| 
| and I get the output.1.png with resolution 29 dpi. it seems right.
| 
| However, if I convert the original tiff to png with the same resolution, and
| then convert the png to lower resolution png or tiff, I get different
| resolution.
| 
| convert input.tiff output.2.png
| convert -density 30 -resize 10% output.2.png output.3.png
| 
| and I get the output.3.png with resolution 76 dpi.
| 
| If I convert the output.2.png to tiff format,
| 
| convert -compress none output.2.png output.4.tiff
| 
| and then
| 
| convert -density 30 -resize 10% output.4.tiff output.5.png
| 
| the resolution of output.5.png is 76 dpi.
| 
| I don't know why the resolution of output.3.png and output.5.png is 76 dpi.
| Any cues, comments or suggestions? Thanks!
| 
| P.S. the original input.tiff is obtain from GIMP with no compression.
| 


Do things in the right order.  READ YOUR IMAGE FIRST

-density can override the input density of an image that has NOT been
read in.  It depends on image format!




  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
 -----------------------------------------------------------------------------
   It's how you get rid of cats.   You get a 500-pound parakeet and teach
   it to say, "Here, kitty kitty kitty"   -- Rick Cook, "Wizardry Cursed"
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/


More information about the Magick-users mailing list