Friday, November 6, 2026 · Asia/KarachiFree tools · No signup · Runs in your browser

Image Cropper

The right half of bars-32x16.png starts at x 16. A 16 by 16 crop from there is the blue half, pixel 0,0 of the result near 20, 40, 200. The left half, from x 0 and y 0, is the red half, near 220, 30, 30. Both results are 16 by 16 PNG files. The origin is the top left. Y grows downward, which is the canvas rule, not the PDF rule where y grows upward.

New

X and y are the top-left of the crop. The rectangle must sit inside the image. Output is PNG.

How to use

  1. Crop x 16, y 0, 16 by 16 to take the blue half of the bars.
  2. Crop x 0, y 0, 16 by 16 to take the red half.
  3. Read a refusal if the rectangle hangs off the 32 by 16 image.

Formula / how it works

The right half of bars-32x16.png starts at x 16. A 16 by 16 crop from there is the blue half, pixel 0,0 of the result near 20, 40, 200. The left half, from x 0 and y 0, is the red half, near 220, 30, 30. Both results are 16 by 16 PNG files. The origin is the top left. Y grows downward, which is the canvas rule, not the PDF rule where y grows upward.

The rectangle must sit inside the image. x 20 and width 16 on a 32-pixel image is refused, and the error names the 32 by 16 size. You do not get a crop that quietly clamps. A zero width is refused. The sample uses height 16 on an image that is only 16 tall, so y must be 0. That is the whole vertical extent.

Nothing is scaled. The pixels in the rectangle are the pixels in the PNG. A later resize can shrink the crop. Doing it here would hide whether the crop itself was right. GIF animations contribute one frame. The source file is not overwritten.

The crop at x 16 is the blue half, 16 by 16, with a corner near 20, 40, 200. The crop at x 0 is the red half, with a corner near 220, 30, 30. Y points down. A rectangle that leaves the 32 by 16 image is rejected instead of clamped. The pixels are copied, not resampled. Shrink the crop on the resizer if the next step needs a smaller file. The source image stays where it was.

A crop of the full 32 by 16 image would be x 0, y 0, width 32, height 16, and it would be a copy. The samples cut 16 by 16 instead, which is the entire height, so y has to be 0. Moving y to 1 would make the rectangle 17 pixels tall in effect and the run would refuse it. The blue corner and the red corner are how you know the halves were not swapped.

Change the size after the cut with image resizer. Two crops side by side is combine images.

Worked examples

Blue half from x 16

Inputs: icr-f: bars-32x16.png | icr-x: 16 | icr-y: 0 | icr-w: 16 | icr-h: 16

On this page, take bars-32x16.png, then 16, then 0, then 16, then 16 and press Crop. Y grows downward from the top left.

Result: Cropped to 16×16 PNG from x 16, y 0. The origin is the top left. 0.1 KB

Red half from x 0

Inputs: icr-f: bars-32x16.png | icr-x: 0 | icr-y: 0 | icr-w: 16 | icr-h: 16

On this page, take bars-32x16.png, then 0, then 0, then 16, then 16 and press Crop. Y grows downward from the top left.

Result: Cropped to 16×16 PNG from x 0, y 0. The origin is the top left. 0.1 KB

Use cases

  • Taking the blue right half as its own 16 by 16 PNG.
  • Taking the red left half as its own 16 by 16 PNG.
  • Trusting the top-left origin, with y growing downward.
  • Refusing a crop that would need a quiet clamp.

Tips & limitations

  • Pixel 0,0 of the right crop is near 20, 40, 200.
  • Pixel 0,0 of the left crop is near 220, 30, 30.
  • Height 16 on a 16-pixel image forces y to 0.
  • Scale afterwards if the crop should also shrink.

FAQ

Which half is the crop at x 16?

The blue half. The result is 16 by 16 and the corner pixel is near 20, 40, 200.

Which half is the crop at x 0?

The red half. The corner pixel is near 220, 30, 30.

Which way does y point?

Down. The origin is the top left, unlike a PDF page where y points up.

What if the rectangle falls off the image?

The run stops and names the 32 by 16 size. It does not clamp.

Are the pixels resampled?

No. The rectangle is copied. Resize is a separate page.

Is the source file overwritten?

No. The download is a new PNG.

The blue and red 16 by 16 crops are halves of bars-32x16.png. A photo crop will not be those colours.