I don't know whether it is really a bug or just some JPEG-encoding-internal-strangeness
Test at https://commons.wikimedia.org/wiki/File:Bot-Test.jpg
Start size: 324829; then, after first rotation 281901, then 275364, then 270655 and finally after 4 rotations just 268076 Bytes:
<ii size="268076" width="512" height="512" comment="Bild um 90 Grad im Uhrzeigersinn gedreht" /> <ii size="270655" width="512" height="512" comment="Bild um 270 Grad im Uhrzeigersinn gedreht" /> <ii size="275364" width="512" height="512" comment="Bild um 270 Grad im Uhrzeigersinn gedreht" /> <ii size="281901" width="512" height="512" comment="Bild um 90 Grad im Uhrzeigersinn gedreht" /> <ii size="324829" width="512" height="512" comment="Reverted to version as of 18:08, 29 November 2012" />
Expected result: After 360° rotation and if the image is not cropped, the file size is supposed to be the same.
Why isn't simply the Metadata of the file manipulated (the EXIF-Orientation-tag). The image-scalers would do the remaining work.
Version: 1.21.x
Severity: normal
See Also:
https://rt.wikimedia.org/Ticket/Display.html?id=4821
https://bugzilla.wikimedia.org/show_bug.cgi?id=36221