trevcan@internets /dev/human $

Resizing images on Linux while keeping aspect ratio.

Posted on: 04/11/22 01:43:36
Last edited: 04/11/22 01:43:36

bored ?, read [0].

tldr

convert FILE -resize SIZE OUT_FILE

convert image.jpeg -resize 300x new-image.jpeg

( resizes image.jpeg to 300x width, scaling height accordingly and writing it to new-image.jpeg)

Where FILE is the input image file you’d like to resize, SIZE is the new size in pixels, e.g. 500x will set a 500x width and scale the height accordingly whilst keeping the aspect ratio. And OUT_FILE is the output file. No, it won’t modify the original file.

That is all. oh, no. Dependencies!!

dependencies

references

Tags: guides