so.cl

Rascals are always sociable, and the chief sign that a man has any nobility in his character is the little pleasure he takes in others company. Arthur Schopenhauer


A one-liner to convert and scale any JPEG image into a square 512x512 pixels only if any side is larger than 512px.

$ convert -resize 1:1\!\> -resize 512x512\> input.jpg output.jpg
  • 1:1 is the aspect ratio
  • ! ignores the original aspect ratio
  • > shrinks the larger side