gooo The Go ports lab / experimental

RECTANGLES / COMPILED GOOO

Where does this crop land?

Find the part of a requested crop that falls inside your bounds. Keep exact coordinates, even beyond JavaScript’s safe integer range.

A coordinate calculation only: no image is uploaded, cropped or resized. Coordinates stay in this browser and are not saved.

Loading the WebAssembly program…

Report a problem

Keep the requested rectangle's minimum and maximum as entered. Reversed coordinates describe an empty rectangle. Bounds always remain unchanged.

Bounds

The region the crop must fit inside.

Requested crop

The region you want to keep.

Each coordinate is an integer from -9223372036854775808 to 9223372036854775807. Enter decimal digits, with a minus sign for negative values.

Minimum edges are included; maximum edges are excluded. Reversed or zero-size rectangles are empty. Touching an edge alone does not create an overlap.

Choose an example or edit the coordinates, then plan the crop.

Intersection

NOT RUN

Your exact result will appear here.

An empty intersection returns all four coordinates as 0 and has_pixels: false, even when the input is away from the origin.

has_pixels describes geometry. It does not check image data, available memory or an image library’s size limits.

A Gooo program you can reuse.

The same CropPlan consumer used by the native example calls the Gooo RectangleIntersect and RectangleEmpty ports. The browser passes your original coordinates to the compiled program.

Use the native example ↗

Program source and build evidence

The WebAssembly bytes must match the SHA-256 hash in this build’s metadata before execution is enabled. Build receipts and Go reference cases are separate from your browser result.

Program identity will appear after loading.