One crop rectangle is not one instruction. Set on the first image and applied as fixed pixels to the other eleven, it returned eleven files of identical size in which 51.97% of all output pixels were invented padding, and three files held no source pixels at all.
The rectangle was 2000 x 1500, 3,000,000 pixels, 25% of the first 4000 x 3000 photo. Carried unchanged, it wrote 33,000,000 pixels: 15,850,000 real and 17,150,000 zeros. Scaled to each file instead, it kept 25% of every file, added 0 padding, and produced 9 different sizes. Twelve files went in; a 1,200-byte truncated JPEG failed to decode, so eleven came out.
This page is about what a single crop decision does to a folder, not about picking a ratio. For one-in-one-out operations on the same twelve files, see the batch grayscale measurement, the batch invert measurement and the batch rotate measurement. For the opposite directions, many files into one canvas and one file into many tiles, the geometry is different. For a single file, the photo cropper measurement covers what gets thrown away.
Twelve files, 20,934,926 bytes on disk, 63,016,384 pixels across the eleven that decoded: six JPEGs (one truncated), four PNGs, one six-frame GIF, one lossy WebP. The first file was a 4000 x 3000 landscape JPEG. On it we marked a centred rectangle with corners at (1000, 750) and (3000, 2250), so the box was 2000 x 1500, 3,000,000 pixels, exactly 25% of the first image's 12,000,000 pixels.
That one rectangle was then carried to the other ten readable files in two ways. Fixed pixels applied the identical box (1000, 750, 3000, 2250) to every file regardless of its size. Proportional scaled the box to each file's own width and height: (W/4, H/4, 3W/4, 3H/4). Both modes were run through three output settings: lossless PNG, the same format as the input file (JPEG quality 90, PNG, WebP quality 80, GIF), and forced JPEG quality 90. That is 2 modes x 3 settings x 11 readable files = 66 output files, each reopened from disk and compared pixel by pixel against the crop it came from.
Image.crop((left, top, right, bottom)). The run used Pillow 13.0.0, numpy 2.5.4 and Python 3.13.14 on local files. No file left the machine.The two modes agree on exactly one file: the first. Everywhere else they disagree about what "the same crop" means. Fixed pixels give eleven files of one size, 2000 x 1500, with wildly different amounts of real content. Proportional gives 9 different output sizes, from 2000 x 1500 down to 64 x 64, each holding 25% of its own input.
| Measure | Fixed pixels | Proportional |
|---|---|---|
| Output sizes | 1 (2000 x 1500 for all eleven) | 9 distinct sizes |
| Total box pixels | 33,000,000 | 15,754,096 |
| Real source pixels | 15,850,000 | 15,754,096 |
| Padding pixels added | 17,150,000 | 0 |
| Padding share of output | 51.97% | 0% |
| Files needing padding | 6 of 11 | 0 of 11 |
| Share of input kept per file | 0% to 33.333% | 25% for every file |
| Files with zero source pixels | 3 | 0 |
One more consequence of a single rectangle: it was centred on 1 of the 11 readable files. The box centre sits at (2000, 1500). On a 3000 x 4000 portrait the image centre is (1500, 2000), so the box is 500 pixels right and 500 above centre. On the 128 x 128 icon it is 1,936 pixels right and 1,436 below. A rectangle is a set of stored coordinates, not a request for the middle of each picture.
Applied unchanged, the box covered 3,000,000 pixels on every file. Only five files contained all of them. The other six were smaller than the rectangle in at least one direction, and the missing area came back as zeros: black for RGB and grayscale, fully transparent for RGBA. Across the batch that is 17,150,000 invented pixels, 51.97% of the 33,000,000 written, against 15,850,000 real ones, 48.03%.
We checked the fill behaviour on a control image first. A solid 100 x 100 RGB square cropped with the box (80, 80, 180, 180) returned a 100 x 100 result containing 400 pixels of the original colour and 9,600 zero pixels. No exception was raised. The library's reference page documents the four-number box and says nothing about what happens past the edge; a first-hand post from a developer who hit this in a training pipeline shows the same zero fill, while a batch-cropping tutorial claims a small image makes the crop fail outright. The files settle it: it pads.
| File | Input size | Input bytes | Real px | Padding px | Kept of input |
|---|---|---|---|---|---|
| photo_landscape.jpg | 4000 x 3000 | 2,403,704 | 3,000,000 | 0 | 25% |
| photo_portrait.jpg | 3000 x 4000 | 2,443,475 | 3,000,000 | 0 | 25% |
| photo_square.png | 3000 x 3000 | 10,636,840 | 3,000,000 | 0 | 33.333% |
| duplicate_photo.jpg | 3000 x 4000 | 2,443,475 | 3,000,000 | 0 | 25% |
| exif_orient6.jpg | 2000 x 1500 | 703,335 | 750,000 | 2,250,000 | 25% |
| screenshot.webp | 1600 x 900 | 186,788 | 90,000 | 2,910,000 | 6.25% |
| logo_alpha.png | 1200 x 800 | 8,367 | 10,000 | 2,990,000 | 1.042% |
| gray_16bit.png | 800 x 600 | 12,042 | 0 | 3,000,000 | 0% |
| gray_8bit.jpg | 3000 x 4000 | 2,068,147 | 3,000,000 | 0 | 25% |
| animation.gif | 400 x 300 | 5,339 | 0 | 3,000,000 | 0% |
| small_icon.png | 128 x 128 | 22,214 | 0 | 3,000,000 | 0% |
| broken.jpg | claims 3000 x 4000 | 1,200 | failed to decode, skipped | ||
The kept share is real pixels divided by that file's own input pixels, so the 3000 x 3000 square keeps 33.333% while the 4000 x 3000 first photo keeps 25%. The same 3,000,000-pixel box is a different proportion of every input.
The 800 x 600 16-bit PNG, the 400 x 300 GIF and the 128 x 128 icon were each smaller than the rectangle in both directions. All three produced a 2000 x 1500 file with 3,000,000 zero pixels and 0 real pixels. The 16-bit PNG stayed in I;16 mode but held exactly 1 distinct value. The GIF arrived as a single black still. The icon was a 3,000,000-pixel black square. Every one of them is a valid, openable image file, so a file count and a preview grid of uniform thumbnails both look correct.
The transparent 1200 x 800 logo was close to that fate. Its overlap with the rectangle was 10,000 pixels, 1.042% of the input, in a 3,000,000-pixel frame. Because the padding for an RGBA image is transparent zero, all 3,000,000 output pixels of the PNG had alpha 0. The file is fully invisible, not black.
Scaling the rectangle to each file removed padding entirely. Total box pixels fell to 15,754,096, all of them real, 0 added. Every file kept 25% of its own input, and that uniformity is the whole point: 25.0% of the 63,016,384 input pixels is what the run wrote. The cost is that the outputs no longer share a size. Nine distinct sizes appeared, from the first image's 2000 x 1500 to the icon's 64 x 64.
| File | Proportional box | Output size | Real pixels | PNG bytes |
|---|---|---|---|---|
| photo_landscape.jpg | (1000, 750, 3000, 2250) | 2000 x 1500 | 3,000,000 | 4,151,425 |
| photo_portrait.jpg | (750, 1000, 2250, 3000) | 1500 x 2000 | 3,000,000 | 4,120,566 |
| photo_square.png | (750, 750, 2250, 2250) | 1500 x 1500 | 2,250,000 | 2,971,675 |
| duplicate_photo.jpg | (750, 1000, 2250, 3000) | 1500 x 2000 | 3,000,000 | 4,120,566 |
| exif_orient6.jpg | (500, 375, 1500, 1125) | 1000 x 750 | 750,000 | 1,099,178 |
| screenshot.webp | (400, 225, 1200, 675) | 800 x 450 | 360,000 | 500,550 |
| logo_alpha.png | (300, 200, 900, 600) | 600 x 400 | 240,000 | 1,917 |
| gray_16bit.png | (200, 150, 600, 450) | 400 x 300 | 120,000 | 3,686 |
| gray_8bit.jpg | (750, 1000, 2250, 3000) | 1500 x 2000 | 3,000,000 | 1,482,322 |
| animation.gif | (100, 75, 300, 225) | 200 x 150 | 30,000 | 133 |
| small_icon.png | (32, 32, 96, 96) | 64 x 64 | 4,096 | 8,493 |
| broken.jpg | failed to decode, skipped | |||
The 16-bit PNG shows why the choice matters: under proportional it kept 16,640 distinct values between 16,411 and 49,123 in I;16 mode. Under fixed pixels it kept 1. The transparent logo kept 240,000 pixels, 80,400 of them fully transparent, 33.5%, and a visible corner at RGB 28, 94, 216.
Cropping copies pixels. Reopening the 66 output files and comparing them against the crops they came from separates the cut from the encoding. PNG changed 0 pixels in both modes. Same-as-input changed 8,230,520 pixels under fixed pixels, 24.941% of the 33,000,000 written, and 10,180,434 under proportional, 64.621% of 15,754,096. Forced JPEG quality 90 changed 13,523,443, 40.98%, and 12,110,599, 76.873%.
| Mode / output | Bytes | vs input | Changed pixels | Changed share |
|---|---|---|---|---|
| Fixed / PNG | 14,782,587 | 0.706 x | 0 | 0% |
| Fixed / same format | 5,695,085 | 0.272 x | 8,230,520 | 24.941% |
| Fixed / JPEG q90 | 2,974,018 | 0.142 x | 13,523,443 | 40.98% |
| Proportional / PNG | 18,460,511 | 0.882 x | 0 | 0% |
| Proportional / same format | 6,169,656 | 0.295 x | 10,180,434 | 64.621% |
| Proportional / JPEG q90 | 3,783,240 | 0.181 x | 12,110,599 | 76.873% |
Changed share uses that mode's own box pixels as the denominator: 33,000,000 for fixed, 15,754,096 for proportional. Input for the byte ratios is 20,933,726 bytes, the eleven files that decoded.
Every one of the six settings wrote fewer bytes than the 20,933,726 bytes of readable input. The forced-JPEG fixed run was smallest at 2,974,018 bytes, 0.142 x the input, a 85.793% drop. The largest was proportional PNG at 18,460,511 bytes, 0.882 x, a 11.814% drop.
Proportional PNG cost 3,677,924 bytes more than fixed PNG, 24.88% above it, even though fixed wrote more than twice as many pixels. Zeros compress. The 17,150,000 padding pixels added almost nothing to the fixed run's file sizes, so the setting that invented half its output was also the cheaper one to store.
Four behaviours are worth separating from the crop itself, because none of them is visible in a thumbnail grid.
The twelfth file was a 1,200-byte truncated JPEG claiming to be 3000 x 4000. It failed with image file is truncated (2 bytes not processed). We skipped it and kept going, which is what a batch loop does: the run produced 66 output files, not 72. No error surfaced to the count of outputs. The readable inputs totaled 20,933,726 bytes; the 1,200-byte difference is that one file.
The 66 output files took 7,474.42 ms of crop and save work. Cropping cost 86.47 ms, 1.157%; writing cost 7,387.94 ms, 98.843%, or 85.439 times as much as cutting. The cut is nearly free. A second full run of both modes and all three output paths produced byte-identical files in all six directories; the combined fixed-pixel PNG tree hashed to SHA-256 71e5b27ae285aef1 on both runs.
We did not test a content-aware or face-aware crop, a crop with a chosen focal point, an aspect-ratio preset that resizes after cutting, or any browser-based tool. We did not measure how any online service interprets "same as the first image"; those readings are from published interfaces, not from running them. We did not reinsert EXIF tags, try a scaling conversion from 16-bit to 8-bit, or add a background colour to padded areas. The figures come from eleven local files and one particular rectangle. A different rectangle changes every percentage here.
Yes, but one rectangle does not mean one result. In our batch of twelve mixed files, applying the identical 2000 x 1500 box to all of them produced eleven files of the same size while the share of each input kept ranged from 0% to 33.333%. Six of the eleven files needed padding because the box reached past their edges, and three came back with zero source pixels. The proportional version kept 25% of every file, added 0 padding pixels, and produced 9 different output sizes. Decide first whether you need one output size or one kept fraction.
They are padded with zeros, not rejected. A solid 100 x 100 control image cropped with the box (80, 80, 180, 180) returned 400 pixels of the original colour and 9,600 zero pixels, with no exception raised. In the batch, the 800 x 600 16-bit PNG, the 400 x 300 GIF and the 128 x 128 icon each became a 2000 x 1500 file of 3,000,000 zero pixels. For an RGBA image the padding is transparent: the 1200 x 800 logo came back with all 3,000,000 output pixels at alpha 0, so it looks empty rather than black.
No. The box was centred on exactly 1 of the 11 readable files, the 4000 x 3000 first image. On a 3000 x 4000 portrait its centre sits 500 pixels right and 500 above the image centre; on the 128 x 128 icon it is 1,936 right and 1,436 below. Under fixed pixels each file kept between 0% and 33.333% of its own input, even though every output was 2000 x 1500. Under proportional, every file kept 25% and the outputs ranged from 2000 x 1500 down to 64 x 64.
The cut itself does not. Saved as lossless PNG, both modes changed 0 pixels out of 33,000,000 for fixed pixels and 0 out of 15,754,096 for proportional. The save decides. Same-as-input output changed 8,230,520 pixels, 24.941%, and 10,180,434, 64.621%, in the two modes. Forced JPEG quality 90 changed 13,523,443, 40.98%, and 12,110,599, 76.873%. Padding also matters: the fixed run wrote 17,150,000 zero pixels that compress to almost nothing, so its PNG output cost 14,782,587 bytes against 18,460,511 for proportional PNG.
The fixed rectangle barely touched it. The 1200 x 800 transparent PNG overlapped the box by only 10,000 of 3,000,000 pixels, 1.042% of its input. The rest was filled with transparent zeros, so all 3,000,000 pixels of the PNG output had alpha 0. The proportional crop kept 240,000 pixels, 80,400 of them fully transparent, 33.5%, with the first corner at RGB 28, 94, 216. Forcing JPEG dropped the alpha channel entirely, leaving 0 transparent pixels and a black background where the padding was.
The mode conversion clipped it. The proportional crop of the 800 x 600 grayscale file stayed in I;16 mode with 16,640 distinct values between 16,411 and 49,123. Forcing JPEG converts I;16 to 8-bit L, and every one of those values is above 255, so the saved file held exactly 1 distinct value, 255, which is white. A 16-bit channel offers 65,536 levels against 256 at 8 bits, a 99.609% reduction in available depth. Under the fixed box the same file never entered the output at all: 0 real pixels, 3,000,000 zeros.
Two things happened. The 400 x 300 GIF had 6 frames and every output combination returned 1 frame. Under fixed pixels the file was also smaller than the rectangle in both directions, so all 3,000,000 output pixels were zero padding with no source content, which displays as black. The proportional crop kept 30,000 real pixels in a 200 x 150 still, but it was still a single frame. Cropping does not preserve animation in this pipeline.
One 1,200-byte truncated JPEG failed with image file is truncated (2 bytes not processed) and was skipped. The eleven readable inputs totaled 20,933,726 bytes out of 20,934,926 on disk, and 63,016,384 pixels. The run wrote 66 output files, 2 modes times 3 output settings times 11 readable files, not 72. Count the inputs and count the outputs: a missing file leaves no gap in a uniform thumbnail grid.
It repeats exactly. A second full run produced byte-identical files in all six output directories, with the combined fixed-pixel PNG tree at SHA-256 71e5b27ae285aef1 on both runs. Writing the 66 files took 7,474.42 ms total: 86.47 ms, 1.157%, was cropping and 7,387.94 ms, 98.843%, was saving, or 85.439 times as much. The cut is nearly free compared with encoding.
Related measurements on the same twelve files: what one split button does to a batch (one file becomes 99 tiles), what one merge button does to a batch (many inputs become one padded canvas), and what one invert button does to a batch (a reversible operation that still changes bytes). For a single-file crop, the photo cropper measurement covers what is thrown away; for a browser tool, the crop image page does the cut locally. Batch resizing is a different operation with its own geometry.
See all free image tools and measured guides