I have a bunch of images that are desktop wallpapers, but different sizes. For my examples, I will use the resolution 1920x1080. How do I scale the images so that:
- For images smaller than my screen in width and height, the image is centered and then scaled up proportionally until the smaller of the two reaches 1920 or 1080
- For images smaller than my screen in width or height, the image is centered and then
- If the image is portrait, the width will be scaled up to 1920 and the height will be scaled proportionally
- If the image is landscape, the height will be scaled up to 1080 and the width will be scaled proportionally
- For images larger than my screen in width and height, the image is centered and then
- If the image is portrait, the width will be scaled down to 1920 and the height will be scaled proportionally
- If the image is landscape, the height will be scaled down to 1080 and the width will be scaled proportionally
I tried mogrify -resize 1920x *.png
, mogrify resize x1080 *.png
, and mogrify resize 1920x1080 *.png
, but I get borders on at least 1 image with each of these commands.