^image.copy[source](x1;y1;width1;height1;x2;y2)
^image.copy[source](x1;y1;width1;height1;x2;y2;width2;height2;color_precision)
The method copies a fragment of one image to another. It is very useful in such tasks as placing signs on a map. The method gets the following parameters:
1. Source image
2. Coordinates (X1;Y1) of the left top corner of copied fragment
3. Width and height of copied fragment
4. Coordinates (X2;Y2) to which copied fragment will be pasted
5. As optional parameters you can specify new width and height of pasted fragment (in this case the fragment will undergo scaling), and value characterizing precision of color reproduction, The less this value is, the more precise the color reproduction will be, but number of reproduced colors is decreased in this case-and vice versa (default number of colors is 150)
$response:body[^mygif_new.gif[]]
In this example, we create two objects of class image. The first is based on existing GIF file; the second, which is twice as big, is generated by Parser itself. After that, we copy into it the fragment of the first file scaled up to the entire width and height of the second image. The last line of the code outputs the scaled fragment. It is advisable to use this approach only to the images, which do not demand high quality.