Application icon

Crop Artwork

This function provides the ability to crop a single artwork item at a specified index. Note that the indexes are zero based. Index zero represents the default artwork item in any file.

If you pass \sa for the index, it will match a single selected artwork item. More information can be found in the Accessing Selected Artwork topic.

When an action is running grouped, an index is valid if it is in the range of zero to the number of artwork items-1.

When an action is running stepwise, an index is only valid if it represents exactly the same artwork item in all files.

If the index field is invalid at runtime, no attempt will be made to crop the image

The statement has five crop modes:

Crop at Supplied Offsets

With this function you specify left, right, top and bottom offsets. Each offset field must resolve to be a positive integer which is the offset to be applied to the respective edge. If any offset field is invalid at runtime, no attempt will be made to crop the image. If all four offsets resolve to be 0, no attempt will be made to crop an image.

Square Retaining Top/Left

If the width is not equal to the height, the artwork item will be squared to the smaller of the width and height such that the top (or left) of the item is retained.

Square Retaining Center

If the width is not equal to the height, the artwork item will be squared to the smaller of the width and height such that the center of the item is retained.

Square Retaining Bottom/Right

If the width is not equal to the height, the artwork item will be squared to the smaller of the width and height such that the bottom (or right) of the item is retained.

Square at Percentage Offset

If the width is not equal to the height, the artwork item will be squared to the smaller of the width and height such that the specified percentage is applied to the top (left) of the item. 0 is equivalent to Square Retaining Top/Left, 50 is equivalent to Square Retaining Center and 100 is equivalent to Square Retaining Bottom/Right.

All text fields may contain any of the sequences described in Escape Sequences. However when running stepwise they are evaluated only once based on the first file. This is due to the fact that only one crop function is performed when run stepwise.

The resultant width and height must be no smaller than 32 or no attempt will be made to do the crop function.

The action test state is set as follows: