I'm currently using mogrify -strip image.jpg to remove unwanted bytes from images, it was suggested I could remove further data by using jpegran from libjpeg, something like:
jpegtran -copy none -optimize -outfile image.jpg image.jpg
The problem I'm having – if it even is a problem – is that jpegtran doesn't seem to actually do anything that mogrify isn't already doing. In all my testing the filesize just stays the same. If I remove the mogrify part of my code and replace with jpegtran then it seems to perform the same function.
For example:
- image without compression: 300k
- image with
mogrify -strip+jpegtran: 272k - image with
mogrify -striponly: 272k - image with
jpegtranonly: 272k
I was under the impression though that mogrify just removed image profiles/comments and that jpegtran did this as well as losslessly compressing the image to make it smaller. Am I missing something?