1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
cond([[ master()->resolv("Image") ]], 
[[ 
  test_true(programp(Image.image)) 
  test_true(objectp(clone(Image.image))) 
  test_true(objectp(clone(Image.image,10,10))) 
  test_true(objectp(clone(Image.image,10,10,1,1,1))) 
  test_eq(clone(Image.image,10,12)->xsize(),10)) 
  test_eq(clone(Image.image,10,12)->ysize(),12)) 
  test_true(objectp(clone(Image.image,10,10,1,1,1)->copy())) 
  test_eq(clone(Image.image,10,12)->copy()->xsize(),10)) 
  test_eq(clone(Image.image,10,12)->copy()->ysize(),12)) 
dnl  test_true(objectp(clone(Image.image,10,10)->crop(2,2,3,3))) 
  test_true(objectp(clone(Image.image,10,10)->autocrop())) 
  test_true(objectp(clone(Image.image,10,10)->gray())) 
  test_true(objectp(clone(Image.image,10,10)->color(2,2,4))) 
  test_true(objectp(clone(Image.image,10,10)->invert())) 
  test_true(objectp(clone(Image.image,10,10)->threshold(10,20,30))) 
dnl matrix 
  test_true(objectp(clone(Image.image,10,10)->scale(2.1))) 
  test_eq(clone(Image.image,10,12)->scale(2.0)->xsize(),20) 
  test_eq(clone(Image.image,10,12)->scale(2.0)->ysize(),24) 
  test_true(objectp(clone(Image.image,10,10)->scale(0.2))) 
  test_true(objectp(clone(Image.image,10,10)->scale(2.0,0.2))) 
  test_true(objectp(clone(Image.image,10,10)->scale(0.2,2.2))) 
  test_true(objectp(clone(Image.image,10,10)->scale(0.2,2.2))) 
  test_true(objectp(clone(Image.image,10,10)->scale(0.2,2.2))) 
  test_eq(clone(Image.image,10,10)->scale(33,57)->xsize(),33) 
  test_eq(clone(Image.image,10,10)->scale(33,57)->ysize(),57) 
  test_true(stringp(clone(Image.image,10,10)->toppm())) 
dnl fromppm 
  test_true(stringp(clone(Image.image,10,10)->toppm())) 
  test_true(stringp(clone(Image.image,10,10)->togif())) 
  test_true(objectp(clone(Image.image,10,10)->paste(clone(Image.image,3,3),2,3))) 
dnl past_alpha 
dnl past_mask 
  test_do(clone(Image.image,10,10)->setcolor(2,2,2)) 
  test_do(clone(Image.image,10,10)->setpixel(2,2,2,2,2)) 
  test_do(clone(Image.image,10,10)->line(2,2,4,4,2,2,2)) 
  test_do(clone(Image.image,10,10)->box(2,2,4,4,2,2,2)) 
  test_do(clone(Image.image,10,10)->circle(2,2,4,4,2,2,2)) 
dnl tuned_box 
  test_eq(clone(Image.image,10,10)->xsize(),10) 
  test_eq(clone(Image.image,10,10)->ysize(),10) 
  test_do(clone(Image.font)) 
  test_do(clone(Image.font)->load("SRCDIR/testfont")) 
  test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); return o->height(),19) 
  test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); return o->write("foo")->xsize(),23) 
  test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); return 
o->write("foo")->ysize(),20) 
dnl  test_any(object o=clone(Image.font); o->load("SRCDIR/testfont"); o->write("foo"); clone(Image.image,100,100)->paste_alpha(o); return 1,1) 
]])