36e14f1997-02-11Fredrik Hübinette (Hubbe) cond([[ master()->resolv("Image") ]],
ab6aec1997-02-11Fredrik Hübinette (Hubbe) [[
36e14f1997-02-11Fredrik Hübinette (Hubbe)  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)))
ab6aec1997-02-11Fredrik Hübinette (Hubbe) dnl matrix
36e14f1997-02-11Fredrik Hübinette (Hubbe)  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()))
ab6aec1997-02-11Fredrik Hübinette (Hubbe) dnl fromppm
36e14f1997-02-11Fredrik Hübinette (Hubbe)  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)))
ab6aec1997-02-11Fredrik Hübinette (Hubbe) dnl past_alpha dnl past_mask
36e14f1997-02-11Fredrik Hübinette (Hubbe)  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))
ab6aec1997-02-11Fredrik Hübinette (Hubbe) dnl tuned_box
36e14f1997-02-11Fredrik Hübinette (Hubbe)  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
ab6aec1997-02-11Fredrik Hübinette (Hubbe) o->write("foo")->ysize(),20)
36e14f1997-02-11Fredrik Hübinette (Hubbe) 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)
ab6aec1997-02-11Fredrik Hübinette (Hubbe) ]])