Page 1 of 1
Trying to reduce the DPI of a image
Posted: 2014-01-28T11:33:48-07:00
by helloworld
Hello,
I am trying to reduce DPI of a image from 300 to 72 by using the below command, for some reason when i go and look at the result image its still showing me the 300 DPI.
command : convert image -density 72 -units pixelsperinch resultimage
Can you help me out.
Re: Trying to reduce the DPI of a image
Posted: 2014-01-28T12:01:13-07:00
by helloworld
I am using,
Version: ImageMagick 6.8.8-2 Q16 x86_64 2014-01-24
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr lzma openexr pangocairo png tiff x xml zlib
Re: Trying to reduce the DPI of a image
Posted: 2014-01-28T12:33:57-07:00
by snibgo
It works fine for me, v6.8.8-0, using png files. What file types are you using?
Re: Trying to reduce the DPI of a image
Posted: 2014-01-28T13:30:18-07:00
by helloworld
I am using jpg image files. and i am on version 6.8.8-2
Re: Trying to reduce the DPI of a image
Posted: 2014-01-28T13:34:09-07:00
by fmw42
try
Code: Select all
convert image.jpg -units pixelsperinch -density 72x72 resultimage.jpg
Does that work. Note there was an old bug that I recall where the units needed to be specified first. Though I expect that has been fixed.
Can you post a link to your input image? You can upload to some free image hosting, such as drop box (public folder) and put a link here. If not, the please provide the results of
identify -verbose yourimage.jpg
and use the code button above to enclose in code tags so that it more readable.
Re: Trying to reduce the DPI of a image
Posted: 2014-01-28T13:40:24-07:00
by snibgo
It works for me:
Code: Select all
convert -size 100x100 xc: -density 300 x.jpg
identify -verbose x.jpg
Resolution: 300x300
convert x.jpg -density 72 y.jpg
identify -verbose y.jpg
Resolution: 72x72
What are your exact commands?
Re: Trying to reduce the DPI of a image
Posted: 2014-01-28T13:47:24-07:00
by helloworld
I tried the command
convert image.jpg -units pixelsperinch -density 72x72 resultimage.jpg which you gave but still it did not worked for me.
Here is the link for the input image
https://app.box.com/s/f77vaznl5ijxm60qt1kq
Re: Trying to reduce the DPI of a image
Posted: 2014-01-28T14:08:16-07:00
by helloworld
Looks like the issue is fixed.
After changing the DPI i am checking it in adobe photoshop, for some reason my photoshop is fixed to 300 PPI by default and now i verified via Preview app in MAC and through identify and now its showing me the correct Resolution.
Re: Trying to reduce the DPI of a image
Posted: 2014-01-28T14:13:02-07:00
by snibgo
It converts fine for me, using "identify" to see the new density.
What tool are you using? Some tools (eg Photoshop) may also bury the density in another field that isn't changed by IM.
Incidentally, I would never use IM to change the metadata of a JPEG. IM will read the image and re-compress it for the writing. This is always lossy for JPEG. Exiftool is a better tool for changing metadata.
EDIT: cross-posted with you.
Re: Trying to reduce the DPI of a image
Posted: 2014-01-28T14:18:34-07:00
by helloworld
It works fine for me now.
After changing the DPI i am checking it in adobe photoshop, for some reason my photoshop is fixed to 300 PPI by default and now i verified via Preview app in MAC and through identify and now its showing me the correct Resolution.