lossless JPEG transformations
lossless JPEG transformations
Is it correct to assume that rotating a JPEG image by 90 or 180 degrees ("convert -rotate 180") or flipping to a mirror image ("convert -flip") involve only the transposition of pixels, and therefore involve no loss in image quality ? Thank you, and kindly forgive the naivete of this question ...
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: lossless JPEG transformations
I believe that is correct, except for JPG or any image that has lossy compression, because it needs to be decompressed and compressed even for 90 rotation increments.
Re: lossless JPEG transformations
ImageMagick recompresses the image even when simply flipping, flopping, or copying a JPEG. There are other applications that do it losslessly, without recompressing, such as the "jpegtran" application that comes with the JPEG library.
Re: lossless JPEG transformations
Thank you for the information! It turns out that the the Debian package "libjpeg-turbo-progs", including "jpegtran", is already installed on my system (Ubuntu 14.04) -- possiblly included as a depency to imagemagick. Currently working with some films scanned into JPG; some of the scans were mis-oriented, or the wrong side of the film was scanned. Converting the images using jpegtran will be a lot easier than digging up the films and re-scanning.