image->crop

Crops an image.

Target member

Signature

1image->crop(...)

Crops an image.

image->crop is called with member syntax on a receiver value. image->crop works with structured document or media data. Keep parsing, transformation, and output steps separate enough that each step can be checked on its own.

Parameters

...
Additional values may be supplied after the earlier arguments.

Examples

Basic call

1image('/tmp/photo.jpg')->crop(-x=0, -y=0, -width=100, -height=100)
The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.