Friday, December 8, 2023

how to resize an image from terminal

    don't you hate it when you upload a picture and when you go to post realize the picture is HUUUUUUUGe. its great that these modern phones have all those pixels but it sucks when your trying to do a quick edit in ms paint.

trying to throw some quick text on there and you gotta zoom all the way out and find the corner of the screen and drag it all down. peeved.

but don't worry there's a better way.

IMAGEMAGICK

the imagemagick command in this case is convert (just like how sox has a bunch of commands other than sox like synth, play, rec). by giving only one input for the dimensions in the argument it conveniently maintains the aspect ration scaling it down nicely.

convert image.png -resize 300 image_resized.png

No comments:

Post a Comment