Layer-ing (Image.lay) takes a size component:
| > Image.lay( ({}), 0,0, 0,0); | Bad argument 4 to Image.lay(). Expected int(1..).
Noone has protested against that, so far.
Image.Image->copy takes coordinates, and can't produce an image smaller then 1x1 pixels:
| > Image.Image(100,100)->copy(20,20,0,0); | (1) Result: Image.Image( 21 x 21 /* 1.3Kb */) | > Image.Image(100,100)->copy(20,20,20,20); | (2) Result: Image.Image( 1 x 1 /* 0.0Kb */)
There is no crop method.
/ Mirar
Previous text:
2004-08-10 11:47: Subject: Image.Image
What about cropping, computing layer intersections etc? It would be ugly if high-level code had to add extra checks for those cases, especially when an empty image is an intermediate result in a longer sequence of operations.
/ Jonas Walldén