Previous Up Next

28.1.6  New images from existing ones

The () operator can be used to create image objects from an existing one. With an image object img:

Note that img is unaffected by the above operations.

Examples

Assume that the image terre.jpg (see Section 28.1.4) is loaded to the variable img. Then:

cropped:=img(220,20,100,100)
     
an image of size 100×100 (RGB)           
display(cropped,0); display(cropped(grey),120)
title:="resized from 512 x 256 to 102 x 51"; display(img(0.2))

Previous Up Next