Options (3)
-fbooleanMirror an image horizontally or vertically
Example:
jpegtran {{[-f|-flip]}} {{horizontal|vertical}} {{path/to/image.jpg}} > {{path/to/output.jpg}}booleanRotate an image 90, 180, or 270 degrees clockwise
Example:
jpegtran {{[-ro|-rotate]}} {{90|180|270}} {{path/to/image.jpg}} > {{path/to/output.jpg}}-gbooleanConvert the image to grayscale
Example:
jpegtran {{[-g|-grayscale]}} {{path/to/image.jpg}} > {{path/to/output.jpg}}Examples (7)
Mirror an image horizontally or vertically
jpegtran [-f|-flip] horizontal|vertical path/to/image.jpg > path/to/output.jpgRotate an image 90, 180, or 270 degrees clockwise
jpegtran [-ro|-rotate] 90|180|270 path/to/image.jpg > path/to/output.jpgTranspose the image across the upper-left to lower right axis
jpegtran -transpose path/to/image.jpg > path/to/output.jpgTransverse the image across the upper right to lower left axis
jpegtran -transverse path/to/image.jpg > path/to/output.jpgConvert the image to grayscale
jpegtran [-g|-grayscale] path/to/image.jpg > path/to/output.jpgCrop the image to a rectangular region of width `W` and height `H` from the upper-left corner, saving the output to a specific file
jpegtran -crop WxH -outfile path/to/output.jpg path/to/image.jpgCrop the image to a rectangular region of width `W` and height `H`, starting at point `X` and `Y` from the upper-left corner
jpegtran -crop WxH+X+Y path/to/image.jpg > path/to/output.jpgmade by @shridhargupta | data from tldr-pages