Icon-Compositor 0.0
Crop

crop(image, [ x, y, ] width, height)

The crop function is used to create a new image from a portion of another image. If you exceed the image boundaries, the new image will be transparent in those areas.

icomp 'crop( dragon.png , 32, 32, 64, 64)' -o crop-dragon.png
   

You can also use the crop function to give dimensions to otherwise dimesionless compositing expressions:

icomp 'crop(red, 128, 128)' -o crop-solid.png
 
The single quotes are only needed on the command line (to insulate the parentheses from the shell) they must not appear in an icomp(1) script.

Auto Crop

auto_crop(image)

The auto_crop function may be used to create a new image by cropping away constant color borders of another image. Note that this should only be applied directly to images, if used after scale or rotate, etc, the results may be unpredictable and probably not what you want.

Auto Crop Alpha

auto_crop_alpha(image)

The auto_crop_alpha function may be used to create a new image by cropping away the transparent edges of another image. Note that this should only be applied directly to images, if used after scale or rotate, etc, the results may be unpredictable and probably not what you want.