Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImageMagick: reduce image size

I am using ImageMagick to reduce the image resolution, height and width.

I have noticed a few things. When I am changing resolution at "Image Size" through Photoshop (version 7) from 300dpi to 150dpi image height and width automatically change.

With ImageMagick however I am not getting such variations. For example, if image contains 878 width and 179 height at 300dpi, when changing it to 150 dpi, automatically the image width changing to 439 and height 89 respectively.

Can any one support me how to obtain such changes through ImageMagick.

like image 963
user4156827 Avatar asked Jan 02 '15 10:01

user4156827


People also ask

How do I resize ImageMagick?

To resize an image to specific dimensions, use the convert command with an input file, the -resize parameter, your preferred dimensions, and an output filename: convert original. png -resize 100x100 new. png.

Which command is used to make an image shorter or longer?

3. What is the difference between Resize and Skew commands? Answer: Resize allows you to make the image narrower, wider, shorter or longer.

Is ImageMagick good?

If you're not sure what ImageMagick is, it's one of the greatest tools you could have on your computer, to manipulate images and a few other types of files.

What is fuzz ImageMagick?

In ImageMagick, fuzz is computed as the root mean squared difference between two colors. fuzz = rmse = sqrt( (rdiff^2 + gdiff^2 + bdiff^2)/3 ) where r,g,b are in quantum range for your compile -- typically Q16 or 16-bits, so 0 to 65535. So fuzz in percent is 100*fuzz/65535.


1 Answers

The dpi setting is not really relevant in most imaging applications/areas, until the point at which you want to print an image.

Do you really need to set it? I mean, if you want to half the size of an image, just use ImageMagick and do:

convert input.jpg -resize 50x50% output.jpg

and ignore the dpi.

like image 181
Mark Setchell Avatar answered Oct 10 '22 09:10

Mark Setchell