One 90° button is not one operation repeated N times. It is N separate file operations that happen to share one control.
We put twelve files through a single clockwise quarter turn. Eleven came back, one failed to open. Every surviving file swapped width and height and kept exactly the same pixel count, yet the pixels themselves behaved five different ways: four PNGs changed zero pixels, five JPEGs changed between 24.17% and 52.50% of theirs, a WebP changed 60.62%, an animated GIF went from six frames to one, and one of those JPEGs, carrying a phone orientation tag, turned twice if the tag survived. The batch grew by 66,317 bytes, 0.3168% of the input. None of that is visible in a thumbnail grid, which is why a batch can look perfect and still be wrong.
This page is about the files, not about which button to press. To rotate a picture right now, our free image rotator runs in the browser and never uploads anything.
Twelve files, 20,934,926 bytes on disk, built from one 3000×4000 photograph (12,000,000 pixels, 3,019,770 bytes) plus a synthetic logo, an icon, a sixteen-bit gradient, a six-frame animation and one deliberately truncated JPEG. The whole queue got the same operation: clockwise 90°, saved back in its own format at the same quality setting.
Pixel drift is measured against an exact in-memory quarter turn of the decoded input. That reference is already lossy for JPEG and WebP, so the differences below are the cost of saving again, not a claim about the original scene. Every number on this page was produced by a local script with Pillow 13.0.0 and re-read from the files it wrote.
Rotation by a quarter turn is the one common batch operation where the dimensions trade places. Flipping, inverting and cropping behave differently, and resizing changes the count. Here a 3000×4000 file becomes 4000×3000 with the same 12,000,000 pixels, and a 128×128 icon stays 128×128 with the same 16,384. No file gained or lost a single pixel.
| File | In → out | Pixels | Bytes in | Bytes out |
|---|---|---|---|---|
| photo_portrait.jpg | 3000×4000 → 4000×3000 | 12,000,000 | 2,443,475 | 2,459,205 |
| duplicate_photo.jpg | 3000×4000 → 4000×3000 | 12,000,000 | 2,443,475 | 2,459,205 |
| photo_landscape.jpg | 4000×3000 → 3000×4000 | 12,000,000 | 2,403,704 | 2,378,916 |
| gray_8bit.jpg | 3000×4000 → 4000×3000 | 12,000,000 | 2,068,147 | 2,088,411 |
| exif_orient6.jpg | 2000×1500 → 1500×2000 | 3,000,000 | 703,335 | 699,621 |
| photo_square.png | 3000×3000 → 3000×3000 | 9,000,000 | 10,636,840 | 10,694,967 |
| logo_alpha.png | 1200×800 → 800×1200 | 960,000 | 8,367 | 8,515 |
| screenshot.webp | 1600×900 → 900×1600 | 1,440,000 | 186,788 | 174,410 |
| animation.gif | 400×300 → 300×400 | 120,000 | 5,339 | 1,074 |
| gray_16bit.png | 800×600 → 600×800 | 480,000 | 12,042 | 13,068 |
| small_icon.png | 128×128 → 128×128 | 16,384 | 22,214 | 22,651 |
| broken.jpg | could not be decoded — no output | |||
Three portrait files became landscape, six landscape files became portrait, and two squares stayed square. That is why a folder of mixed phone shots looks rearranged after a batch rotation even when every filename is untouched: the aspect-ratio mix has inverted.
The geometry is identical for all eleven files. The files are not. We compared each saved output, pixel by pixel, against an exact quarter turn of its decoded input. Zero tolerance, all channels.
| Format group | Changed pixels | Share | Max delta | What happened |
|---|---|---|---|---|
| PNG × 4 (square, RGBA, 16-bit, icon) | 0 of 10,456,384 | 0% | 0 | pixels rearranged, nothing re-encoded |
| GIF, first frame | 0 of 120,000 | 0% | 0 | 6 frames in, 1 frame out |
| JPEG, portrait × 2 | 4,007,157 of 12,000,000 | 33.39% | 27 | re-encoded, mean absolute delta 0.514654 |
| JPEG, landscape | 5,508,665 of 12,000,000 | 45.91% | 31 | re-encoded, mean 0.787601 |
| JPEG, grayscale | 2,900,212 of 12,000,000 | 24.17% | 10 | re-encoded, mean 0.369553 |
| JPEG, tagged | 1,574,922 of 3,000,000 | 52.50% | 46 | re-encoded, mean 1.280903 |
| WebP, lossy | 872,919 of 1,440,000 | 60.62% | 44 | re-encoded, mean 1.720819 |
The zero rows are the point. A quarter turn of a PNG is a rearrangement of values already in the file; the encoder writes them out again without approximating anything. The JPEG rows are the same rearrangement followed by a lossy save, so up to 52.50% of the pixels come back a shade different from the reference even though the picture looks identical. A batch that mixes formats is therefore two jobs wearing one button.
The eleven surviving files went in at 20,933,726 bytes and came out at 21,000,043. That is +66,317 bytes, 0.3168%. Seven files grew, four shrank. The biggest single gain was the square PNG at +58,127 bytes; the biggest loss was the animated GIF, from 5,339 to 1,074 bytes, because five of its six frames did not survive the save.
A quarter turn moves every pixel and changes almost no bytes. Pixel position and file size are answering two different questions.
That near-zero total hides a real spread. The transparent logo grew 148 bytes and kept its full alpha channel. The sixteen-bit PNG stayed in sixteen-bit mode and grew 1,026 bytes. The WebP screenshot shrank 12,378 bytes at the same quality setting. A single "batch got 0.3% bigger" line would be true and useless; the per-file table is the part you would actually check before sending the batch on.
Two of the twelve inputs were byte-identical copies of the same JPEG under different names, sitting at positions 3 and 9 of the queue. Their outputs were also byte-identical: both 2,459,205 bytes, both with SHA-256 prefix e678ccadca9554e7, and both with exactly 4,007,157 changed pixels. Position in the batch did not alter the result.
This is the property a batch depends on. If the same input produced a different file depending on when it was processed, you could not verify a queue by spot-checking, and a re-run would silently drift. A deterministic encoder gives you a cheap check: run one known file twice, at the head and at the tail, and compare hashes.
The truncated JPEG was second in the queue and cost 27.86 milliseconds before the decoder raised an error. What happens next is a design decision, not a technical one. An abort-on-error loop stopped there and delivered 1 file. A skip-and-continue loop delivered 11. Same twelve inputs, same angle, an eleven-fold difference in what you get back.
Batch tools usually report a count, so this is easy to miss: eleven outputs out of twelve inputs looks like a successful run with one bad apple. It is also exactly what an abort looks like if the bad file had been last. Check the count against the queue, and check that the file you expected at the tail actually arrived.
One file carried an EXIF Orientation=6 tag, the kind a phone writes when it stores a portrait shot as landscape pixels and tells viewers to turn it for display. We rotated its pixels 90°, then saved it two ways. Stripped of the tag, the output is 699,621 bytes and a viewer shows a 90° turn. With the tag carried over, the output is 699,657 bytes — 36 bytes more — the tag still reads 6, and a viewer adds its own 90° on top of the pixels. The picture appears turned 180°.
Two correct routes exist. Rotate the pixels and clear the tag, or change only the tag and leave the pixels alone. Doing both turns the photo twice, and doing neither leaves it sideways. In a batch this is worse than it is for one image: the same button lands on tagged and untagged files in the same pass, so a handful of files come out wrong while the rest look fine. That is a queue-level problem, not a per-photo one, and a thumbnail grid of forty images will not show it clearly.
The eleven outputs total 21,000,043 bytes. Zipped with deflate at level 6 they come to 20,750,344 bytes — 249,699 bytes saved, 1.189%. These are already-compressed images, so the archive mostly stores them as-is. If a tool promises that a ZIP will make a batch of JPEGs dramatically smaller, the compression already happened inside the images.
The twelve-file pass took 18,122.14 ms end to end on this machine, averaging 1,644.93 ms per successful file. The slowest was a 12,000,000-pixel JPEG at 4,561.8 ms; the 128×128 icon took 47.9 ms. Those numbers are from a local script, not a browser benchmark, and they scale with pixels rather than with file count. Treat them as an order of magnitude, not a promise about your hardware.
Measured: one clockwise 90° pass, in local files, with Pillow 13.0.0, every output re-opened from disk and compared against an exact quarter turn of its decoded input. Bytes, dimensions, pixel differences, frame counts, orientation tags, hashes, ZIP size and timings all come from that run.
Not measured: any online tool, any browser implementation, HEIC, AVIF, TIFF, RAW or camera profiles, arbitrary angles such as 37°, per-file angles inside one queue, lossless JPEG transforms, or colour-profile handling. We also did not test a queue larger than twelve. Where this page says a tool "can" do something, it is describing the file behaviour we reproduced, not a claim about a specific product.
Yes. One angle can be applied to every file in the batch, but it is not one operation: it is one operation per file, and the result depends on each file's format. In a twelve-file run, eleven files rotated and one undecodable file failed. The lossless formats came back with zero changed pixels while the JPEGs came back re-encoded.
The rotation itself does not rename anything. In our run every output kept its input filename, and the ZIP listed the eleven surviving files in the same sorted order they went in. What does change is width and height: three portrait files became landscape, six landscape files became portrait, and two squares stayed square. A gallery that sorts by aspect ratio can look reordered even though the filenames did not move.
Yes, if the tool re-encodes. Compared against an exact in-memory quarter turn of the decoded input, the five JPEGs that rotated came back with 4,007,157 of 12,000,000 pixels changed (33.39%) on each of the two portrait copies, 5,508,665 (45.91%) on the landscape, 2,900,212 (24.17%) on the grayscale, and 1,574,922 of 3,000,000 (52.50%) on the tagged one. PNG files came back at zero changed pixels. The rotation is exact; the saving is what costs you.
A phone photo can carry an EXIF orientation tag that tells viewers to rotate it for display. We rotated a file tagged Orientation=6 by 90 degrees in pixels. Saved without the tag, a viewer shows a 90 degree turn. Saved with the tag still present, the viewer adds its own 90 degrees on top and shows 180 degrees. Either strip the tag after rotating the pixels, or change only the tag and leave the pixels alone. Mixing the two is what turns a photo twice.
It depends on how the batch is written. We put a truncated JPEG second in a twelve-file queue. An abort-on-error loop stopped there and delivered one file. A skip-and-continue loop delivered eleven. The failing file cost 27.86 milliseconds before the error surfaced, so the cost of a bad file is small; the cost of losing the rest of the batch is not.