AI Image Cropper: Cut Exact Pixel Rectangles

Short answer

Four numbers define the crop — width, height, left, top — and two sums prove it fits. How to measure, what the cropper refuses to do.

Try Assistly Open consoleAssistly · 6 min read

See the example

Keep one rectangle. Leave the original intact.

Actual coordinate crop from the 1254 × 1254 source. The chosen rectangle starts at left 250, top 250 and measures 800 × 800 pixels.

The source mug image was generated for a tutorial. These are public demonstration assets, not customer files. Pixel-operation downloads were produced with the same Sharp operations used by the connected tools.

Two crops of the same mug photograph went to the same client last week. One showed the mug centered with clean margins on every side. The other had sliced a thin strip of shadow off the left edge, and the client noticed before either of us did. The difference between them was four numbers. A cropper is the most literal tool in the image set — it cuts exactly the rectangle you describe, and everything outside it is gone. That literalness is the appeal and the trap: there is no subject detection to save you from a typo, so the person who checks the numbers is the quality control.

The prompt to use in Assistly

Attach the photo and paste this, replacing the bracketed values: Crop the attached image to 800 by 800 pixels using left 250 and top 250, measured from the upper-left origin in whole pixels. Before cropping, check that left plus width and top plus height stay within the image bounds; if the rectangle reaches outside, do not create a file and ask me for corrected values instead. Return the new file, state its final dimensions, and leave the original unchanged.
Try this task

Four numbers, one rectangle

Every crop request comes down to width, height, left, and top, in whole pixels. The origin is the upper-left corner of the image: left counts pixels across from that corner, top counts pixels down. A crop with width 800 and left 250 occupies columns 250 through 1049 — its right edge sits at 1050, which is the arithmetic people get wrong when checking. The rule for validity is one addition each: left plus width must be no more than the image width, and top plus height no more than the image height. If either sum exceeds the source, the rectangle reaches outside the photo.

A centered crop is the same arithmetic run in reverse. Subtract the output width from the image width and halve it for the left value; do the same with the heights for top. On the 1254 by 1254 demonstration image above, an 800 by 800 crop centers at left 227 and top 227 — the actual example shown there uses left 250, top 250, which sits 27 pixels off-center and reads as perfectly balanced anyway. Compute the numbers yourself and state them; a vague instruction like "crop the middle" hands the assistant four values nobody approved. For a related next step, read the Assistly guide on image resizer and check the returned file before use.

Check the source dimensions in your own image viewer before you ask, not from memory of what the file was. A resized copy carries different dimensions from the original, and coordinates that were correct for one are wrong for the other. Attach the same file you measured.

Examples you can follow

  • The centered square with a landmark check

    What to give Assistly. Attach the 1254 by 1254 mug photo and write: "Crop the attached image to 800 by 800 pixels, left 250, top 250, measured from the upper-left origin in whole pixels. Return the result as WebP and leave the original unchanged."

    What Assistly returns. A new 800 by 800 file. The rectangle ends at 1050 horizontally and vertically — within the source — and the original stays untouched in the chat. The demonstration above shows this exact crop on the mug image: the closer framing, the original intact.

    How to verify it. First the dimensions: the file must read exactly 800 by 800, because a crop that lands one pixel off can break a layout or trigger a platform's own rescaling. Then a landmark, which beats eyeballing every time. Pick a sharp feature and note its position in the source — say the handle joint at column 600, row 500. In the crop it should appear at column 350, row 250, because the rectangle moved everything by minus 250 on each axis. If the landmark sits anywhere else, you have the wrong file or the wrong coordinates, and no amount of squinting at a thumbnail will tell you which.

  • The request that reached past the edge

    What to give Assistly. On the same 1254 by 1254 image: "Crop to 800 by 800 at left 600, top 400." Check the sums before sending — left 600 plus width 800 is 1400, which is 146 pixels past the right edge.

    What Assistly returns. Here is the failure mode, taught honestly: the underlying crop implementation can constrain coordinates to the image bounds instead of refusing the request, so you may receive a file cut from the last valid rectangle rather than the one you typed. Your origin was 600; the returned file may effectively start at 454. The tool will not pad the missing strip with blank canvas — no invented pixels, ever — but it also might not reject out of hand, which means "it came back" is not the same as "it came back as requested."

    How to verify it. Read the returned dimensions and then the landmark. If the rectangle was silently shifted, the landmark check exposes it immediately: your chosen feature sits in the wrong place relative to the frame. The fix is yours to make — correct left to 454 or shrink the width, resend, and verify again. Keep a note of rejected or corrected numbers when you hand files to a teammate, so nobody retries the rectangle that does not exist.

What the cropper will not do

It does not find your subject. There is no face, product, or object detection in the pixel operation — ask it to "crop to the perfume bottle" without coordinates and the honest response is a request for numbers, not a guess. It does not extend the canvas, sharpen anything, or brighten anything; those are different operations and belong in separate messages. It does not follow a subject across a batch — every crop is computed from the four numbers and the file attached to that message, so the same numbers on a different photo produce a different picture, correctly.

And it is not the generator. Asking for a new image from a text description runs a separate text-to-image path that never edits the attached photo's pixels. If you want your actual photograph cut, ask for the crop. Continue with a related workflow: AI Image Generator: Create Business Visuals

FAQs

Can the cropper find my subject automatically?

No. It cuts the exact rectangle defined by width, height, left and top, with no object or face detection. Work out the numbers yourself — the centering arithmetic is one subtraction and one division per axis — and state them in the request.

What happens if my rectangle goes past the edge of the photo?

The cropper never pads the result with blank space or invented pixels, but the implementation can constrain coordinates to the image bounds rather than refusing, so you might get a shifted rectangle. That is why the landmark check matters: pick a feature, note its source position, and confirm it lands at the expected spot in the output before you use the file.

Does cropping change my original photo?

No. The result is a new file you download, and the original stays intact in the chat and on your drive. That is what makes experimenting cheap: several rectangles from one source, keep the best, delete the rest.

Why does the downloaded file need checking if my numbers were right?

Because the file is the deliverable, not the conversation. A one-pixel miss breaks layouts, a constrained rectangle shifts your frame, and a stale download can carry last week's crop. Dimensions plus one landmark take under a minute and catch every one of those before the image ships.

Can I crop and compress in one request?

Send them separately. One operation per message means each returned file maps to exactly one change, so when something looks wrong you know which step caused it. Compress the crop you kept, not the other way around.

Try the workflow in Assistly

Create an account