Forrest logo
back to the jpegtran tool

jpegtran:tldr:94e62

jpegtran: Transpose the image across the upper-left to lower right axis.
$ jpegtran -transpose ${path-to-image-jpg} > ${path-to-output-jpg}
try on your machine

The command "jpegtran -transpose" is used to rotate a JPEG image by 90 degrees clockwise. Let's break down the command into its components:

  • "jpegtran": It is a command-line utility used for lossless transformations of JPEG images.
  • "-transpose": This option specifies the transformation to be performed, i.e., the transpose operation, which rotates the image by 90 degrees clockwise.
  • "${path-to-image-jpg}": This should be replaced with the actual path and filename of the input JPEG image you want to rotate.
  • "> ${path-to-output-jpg}": This part redirects the output of the command to a new file specified by "${path-to-output-jpg}". It will create a new JPEG file with the rotated image.

Overall, this command takes an input JPEG file, applies the transpose transformation to rotate the image, and saves the result to a new JPEG file specified by the output path.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the jpegtran tool