image-tools

Image Cropper

Crop a browser-readable JPG, PNG, WebP, or GIF static bitmap with an explicit X, Y, width, and height, then verify the returned output type.

Tool workspace

The interactive tool requires JavaScript.

Instructions

Choose a file this browser can decode. Source width and height must each be between 1 and 16384 pixels.
Enter X and Y for the top-left corner plus crop width and height. Verify that X + width and Y + height do not exceed the source dimensions.
Select PNG, JPEG, or WebP, generate the crop, and inspect the preview, MIME, dimensions, edge content, transparency, and file size before download.

Select one source image, define a rectangle inside its pixel bounds, preview the exact sample, and download only after checking composition, dimensions, and MIME. The crop handler runs with browser image and Canvas APIs.

Direct answer

Image Cropper samples a rectangle from the originally selected static bitmap. X and Y identify its top-left pixel; width and height define the output. For a centered square from 2400 × 1600, use X 400, Y 0, width 1600, and height 1600. The rectangle must stay inside the source, and the download extension is derived only after the returned Blob MIME matches the requested format.

Local file safety limits

Choose one GIF, JPEG, PNG, or WebP file no larger than 20 MiB. Width and height must each be 1–16384 pixels, decoded area must not exceed 16,777,216 pixels, and estimated working memory must not exceed 256 MiB. The browser validates the declared MIME, file signature, decoded bitmap, requested output MIME, and output dimensions.

Output limits

Canvas export can change metadata, EXIF, ICC profiles, orientation handling, animation, transparency, color, and lossy quality. Keep the original and inspect every downloaded output in its destination.

How to use this tool

  1. Choose a file this browser can decode. Source width and height must each be between 1 and 16384 pixels.
  2. Enter X and Y for the top-left corner plus crop width and height. Verify that X + width and Y + height do not exceed the source dimensions.
  3. Select PNG, JPEG, or WebP, generate the crop, and inspect the preview, MIME, dimensions, edge content, transparency, and file size before download.

Worked example: centered 1600-pixel square

A 2400 × 1600 landscape has a shorter side of 1600. A centered square starts at X = (2400 − 1600) ÷ 2 = 400 and Y = 0. Enter 1600 for both sides; the preview should keep 400 pixels outside each horizontal edge and remove none vertically.

Boundary failures are coordinate failures

X and Y cannot be negative. Width and height must be positive, at most 16384, and the full rectangle must remain inside the source. A 1200-pixel-wide source rejects X 900 with width 400 because the right edge would be 1300.

Preview, output, and stale downloads

Coordinate edits redraw the preview from the selected source. Any coordinate, format, or quality change invalidates the previous download. The tool refuses to label a file as JPEG or WebP when Canvas returns a different Blob MIME.

Properties that need separate verification

Cropping removes pixels outside the rectangle but does not guarantee animation, metadata, EXIF, ICC profile, transparency, or exact encoded bytes. JPEG cannot carry alpha. Browser decode, Canvas limits, memory, and encoding behavior vary, so retain the source file.

Local handler boundary

The AIGClub crop handler uses an object URL, an in-memory Image and Canvas, a Blob, and a download link; it has no application upload call. Other page resources, browser extensions, device software, synced folders, and later sharing are outside that statement.

Frequently asked questions

How do I diagnose an out-of-bounds crop?

Calculate the right edge as X + width and the bottom edge as Y + height. Each must be no larger than the source width or height.

Why does a square crop not center the face?

The geometric center only balances pixels. Move X or Y to frame the subject, then inspect the destination mask before export.

Does changing the output format keep the old download valid?

No. Format or quality changes hide the old link; generate and verify a new Blob.

Will the crop preserve an animated GIF?

No such guarantee is made. Canvas operates on the single static bitmap supplied by the browser, so keep the original animation.

Last updated: