7d36901999-06-19Mirar (Pontus Hagland) // -*- pike -*-
0b06cf2000-07-27Per Hedbor // $Id: testsuite.in.in,v 1.25 2000/07/27 02:28:20 per Exp $
7d36901999-06-19Mirar (Pontus Hagland) #module Image.Image
aebf321998-04-16Mirar (Pontus Hagland) { //-----------------------------------------------------------------------
8e781a1998-04-29Mirar (Pontus Hagland) #chapter testsuite
aebf321998-04-16Mirar (Pontus Hagland)  #test Image.PNM.decode, == object img1=Image.PNM.decode("P1\n5 5\n0 1 1 1 1\n1 0 1 1 1\n1 1 0 1 1\n1 1 1 0 1\n1 1 1 1 0"); object img2=Image.PNM.decode("P4\n5 5\nx¸Øèð"); if (img1!=img2) fail("differ\n"); ok(); #test MIME.decode_base64 if ("hejsan, hoppsan" != MIME.decode_base64("aGVqc2FuLCBob3Bwc2Fu\n")) fail("differ"); ok(); #test Image.GIF.decode, MIME.decode_base64, == object img1=Image.GIF.decode(MIME.decode_base64("R0lGODlhBQAFAIAAAAAAAP///ywAAAAABQAFAAACCAxwEWrY8BwoADs=")); object img2=Image.PNM.decode("P4\n5 5\nx\00èØèð"); if (img1!=img2) fail("differ\n"); ok(); //----------------------------------------------------------------------- #chapter create
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image() no image object img=Image.Image();
aebf321998-04-16Mirar (Pontus Hagland)  if (!img || img->xsize() || img->ysize()) fail("have size"); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image() image object img=Image.Image(100,100);
aebf321998-04-16Mirar (Pontus Hagland)  if (!img || img->xsize()!=100 || img->ysize()!=100) fail("wrong size"); if (img!=0) fail("wrong color"); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image() too big
ab8a851999-10-18Mirar (Pontus Hagland)  foreach ( ({0x7fffffff,0x7ffffffff,
9724df1999-10-16Mirar (Pontus Hagland)  0x7ffffffff,0x7fffffffff,0x7ffffffffff}), int x) if (x>0) { if (!catch { Image.Image(x,2); }) fail(x+"x2 permitted (This might be correct - do you have "+x+" *2*4 bytes of memory?)"); if (!catch { Image.Image(x/32768,65537); }) fail((x/32768)+"x65537 permitted"); if (!catch { Image.Image(x/(32768*3),65537); }) fail((x/(32768*3))+"x65537 permitted"); }
aebf321998-04-16Mirar (Pontus Hagland)  ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image() color object img=Image.Image(1000,1000,17,42,96);
aebf321998-04-16Mirar (Pontus Hagland)  if (!img || img->xsize()!=1000 || img->ysize()!=1000) fail("wrong size"); if (img!=({17,42,96})) fail("wrong color"); ok();
7d36901999-06-19Mirar (Pontus Hagland) //----------------------------------------------------- #chapter Image.Color #test Image.Color foreach ( ({ ({ "black", ({ 0, 0, 0 }), ({ 0, 0, 0 }), 0 }), ({ "blue", ({ 0, 0, 255 }), ({ 170, 255, 255 }), 41 }), ({ "cyan", ({ 0, 255, 255 }), ({ 127, 255, 255 }), 168 }), ({ "green", ({ 0, 255, 0 }), ({ 85, 255, 255 }), 127 }), ({ "magenta", ({ 255, 0, 255 }), ({ 212, 255, 255 }), 128 }), ({ "red", ({ 255, 0, 0 }), ({ 0, 255, 255 }), 87 }), ({ "white", ({ 255, 255, 255 }), ({ 0, 0, 255 }), 255 }), ({ "yellow", ({ 255, 255, 0 }), ({ 42, 255, 255 }), 214 }) }), array i) { object c1=Image.Color(i[0]); object c2=Image.Color(@i[1]); object c3=Image.Color.rgb(@i[1]); if (c1!=c2) fail("color "+i[0]+" (rgb="+i[1][0]+","+i[1][1]+","+i[1][2]+ ", hsv="+i[2][0]+","+i[2][1]+","+i[2][2]+") failed; " "by values != by name"); if (c1!=c3) fail("color "+i[0]+" (rgb="+i[1][0]+","+i[1][1]+","+i[1][2]+ ", hsv="+i[2][0]+","+i[2][1]+","+i[2][2]+") failed; " "by rgb() != by name|values"); if (c1->r!=i[1][0] || c1->g!=i[1][1] || c1->b!=i[1][2]) fail("color "+i[0]+" (rgb="+i[1][0]+","+i[1][1]+","+i[1][2]+ ", hsv="+i[2][0]+","+i[2][1]+","+i[2][2]+") failed; " "wrong ->r("+c1->r+"), ->g, ->b reported"); if (c1->rgb()[0]!=i[1][0] || c1->rgb()[1]!=i[1][1] || c1->rgb()[2]!=i[1][2]) fail("color "+i[0]+" (rgb="+i[1][0]+","+i[1][1]+","+i[1][2]+ ", hsv="+i[2][0]+","+i[2][1]+","+i[2][2]+") failed; " "wrong ->rgb() (" +c1->rgb()[0]+","+c1->rgb()[1]+","+c1->rgb()[2]+") reported"); if (c1->hsv()[0]!=i[2][0] || c1->hsv()[1]!=i[2][1] || c1->hsv()[2]!=i[2][2]) fail("color "+i[0]+" (rgb="+i[1][0]+","+i[1][1]+","+i[1][2]+ ", hsv="+i[2][0]+","+i[2][1]+","+i[2][2]+") failed; " "wrong ->hsv() (" +c1->hsv()[0]+","+c1->hsv()[1]+","+c1->hsv()[2]+") reported"); if (c1->greylevel()!=i[3]) fail("color "+i[0]+" (rgb="+i[1][0]+","+i[1][1]+","+i[1][2]+ ", hsv="+i[2][0]+","+i[2][1]+","+i[2][2]+") failed; " "wrong ->greylevel() ("+c1->greylevel()+", should be " +i[3]+") reported"); if (c1->grey()->r!=i[3]) fail("color "+i[0]+" (rgb="+i[1][0]+","+i[1][1]+","+i[1][2]+ ", hsv="+i[2][0]+","+i[2][1]+","+i[2][2]+") failed; " "wrong ->grey()->r ("+c1->grey()->r+", should be " +i[3]+") reported"); }; ok(); #test indices(Image.Color) if (!arrayp(indices(Image.Color))) fail("wrong type\n"); if (!stringp(indices(Image.Color)[0])) fail("wrong type of elements\n"); if (sizeof(indices(Image.Color))<8) fail("too few colors\n"); ok(); #test values(Image.Color) if (!arrayp(values(Image.Color))) fail("wrong type\n"); if (!objectp(values(Image.Color)[0])) fail("wrong type of elements\n"); if (sizeof(indices(Image.Color))!=sizeof(values(Image.Color))) fail("not the same size of indices() and values()\n"); ok(); #test modifiers (no-crash) foreach ( ({ ({ "black", ({ 0, 0, 0 }), ({ 0, 0, 0 }), 0 }), ({ "blue", ({ 0, 0, 255 }), ({ 170, 255, 255 }), 41 }), ({ "cyan", ({ 0, 255, 255 }), ({ 127, 255, 255 }), 168 }), ({ "green", ({ 0, 255, 0 }), ({ 85, 255, 255 }), 127 }), ({ "magenta", ({ 255, 0, 255 }), ({ 212, 255, 255 }), 128 }), ({ "red", ({ 255, 0, 0 }), ({ 0, 255, 255 }), 87 }), ({ "white", ({ 255, 255, 255 }), ({ 0, 0, 255 }), 255 }), ({ "yellow", ({ 255, 255, 0 }), ({ 42, 255, 255 }), 214 }) }), array i) foreach ( ({Image.Color(i[0]),Image.Color.rgb(@i[1])}), object z) { z->light(); z->dark(); z->neon(); z->dull(); z->bright(); } ok();
aebf321998-04-16Mirar (Pontus Hagland) //----------------------------------------------------------------------- #chapter testsuite II
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->test(), == object img=Image.Image(10,10);
824cf91999-01-26Mirar (Pontus Hagland)  img=img->test(42);
aebf321998-04-16Mirar (Pontus Hagland)  if (equal(img->max(),({0,0,0}))) fail("failed"); img->setpixel(2,2,0,255,0); if (img==img->invert()) fail("failed"); ok(); //----------------------------------------------------------------------- #chapter copy
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->copy object img=Image.Image(100,100)->test(42);
aebf321998-04-16Mirar (Pontus Hagland)  if (img!=img->copy()) fail("differ"); if (img->copy(25,25,75,75)!=img->copy(25,25,75,75)) fail("subregion differ"); if (img->copy(25,25,75,75)==img) fail("subregion doesn't differ"); img->setpixel(2,2,0,255,0); if (img->copy()==img->invert()->copy()) fail("copy of other doesn't differ"); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->clear object img=Image.Image(100,100)->test(42);
aebf321998-04-16Mirar (Pontus Hagland)  if (img->clear()==img) fail("doesn't differ"); if (img->clear(0,0,0)!=0) fail("wrong color (black)"); if (img->clear(1,255,0)!=({1,255,0})) fail("wrong color (color)"); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->clone object img=Image.Image(100,100)->test(42);
aebf321998-04-16Mirar (Pontus Hagland)  if (img!=img->clone()) fail("differ"); img->setpixel(2,2,0,255,0); if (img->clone()==img->invert()->clone()) fail("clone of other doesn't differ"); ok();
0d28e31999-06-19Mirar (Pontus Hagland) #test Image.Image->find_autocrop object img=Image.Image(20,20); img->box(4,4,8,8,Image.Color.red); img->box(8,8,12,12,Image.Color.green); img->box(12,4,16,8,Image.Color.blue); array z; if (!equal(z=img->find_autocrop(),({ 4, 4, 16, 12 }))) fail(sprintf("find_autocrop() returned %O, not %O\n",z,({ 4, 4, 16, 12 }))); if (!equal(z=img->find_autocrop(5),({ -1, -1, 21, 17 }))) fail(sprintf("find_autocrop(5) returned %O, not %O\n",z,({ -1, -1, 21, 17 }))); if (!equal(z=img->find_autocrop(-2),({ 6, 6, 14, 10 }))) fail(sprintf("find_autocrop(-2) returned %O, not %O\n",z,({ 6, 6, 14, 10 }))); if (!equal(z=img->find_autocrop(0,1,0,0,0),({ 4, 0, 19, 19 }))) fail(sprintf("find_autocrop(0,1,0,0,0) returned %O, not %O\n",z,({ 4, 0, 19, 19 }))); if (!equal(z=img->find_autocrop(0,0,1,0,0),({ 0, 0, 16, 19 }))) fail(sprintf("find_autocrop(0,0,1,0,0) returned %O, not %O\n",z,({ 0, 0, 16, 19 }))); if (!equal(z=img->find_autocrop(0,0,0,1,0),({ 0, 4, 19, 19 }))) fail(sprintf("find_autocrop(0,0,0,1,0) returned %O, not %O\n",z,({ 0, 4, 19, 19 }))); if (!equal(z=img->find_autocrop(0,0,0,0,1),({ 0, 0, 19, 12 }))) fail(sprintf("find_autocrop(0,0,0,0,1) returned %O, not %O\n",z,({ 0, 0, 19, 12 }))); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->autocrop object img=Image.Image(20,20); img->box(4,4,8,8,Image.Color.red); img->box(8,8,12,12,Image.Color.green); img->box(12,4,16,8,Image.Color.blue); if (img->autocrop()!= Image.GIF.decode(MIME.decode_base64( "R0lGODlhDQAJAJEAAAAAAP8AAAAA/wD/ACwAAAAADQAJAAECIkwcACDSck5azkE5mb1yaYsNg7gJ\r\nHjCOw3mqI+u5K4y6ZwEAOw=="))) fail("autocropped (all) image is not correct"); if (img->autocrop(0,1,0,0,0)!= Image.GIF.decode(MIME.decode_base64( "R0lGODlhEAAUAJEAAAAAAP8AAAAA/wD/ACwAAAAAEAAUAAECOQR8l6rc/SCUc54QcFBCdKFk2XZ4\r\nHniNJHB6ocq1bzYMdYtCtj1YDW/zKYA9IYBoNCaVSmaz+YQ2CgA7"))) fail("autocropped (0,1,0,0,0) image is not correct"); if (img->autocrop(0,0,1,0,0)!= Image.GIF.decode(MIME.decode_base64( "R0lGODlhEQAUAJEAAAAAAP8AAAAA/wD/ACwAAAAAEQAUAAECOgR8l6rc/SCUc1YVQg5KCC80msYd\r\n3xdiZAmgn7h2LqwNg+2m030PFtS7/RpB3/BQPB6Vy2XT6YRGfwUAOw=="))) fail("autocropped (0,0,1,0,0) image is not correct"); if (img->autocrop(0,0,0,1,0)!= Image.GIF.decode(MIME.decode_base64( "R0lGODlhFAAQAJEAAAAAAP8AAAAA/wD/ACwAAAAAFAAQAAECMwQckXEg8kRrQCl2IJT0XNVsUOd9\r\noUhW1zCwIpcebTvEKd3aJF7rFO/zBYVCYrF4RCJjBQA7"))) fail("autocropped (0,0,0,1,0) image is not correct"); if (img->autocrop(0,0,0,0,1)!= Image.GIF.decode(MIME.decode_base64( "R0lGODlhFAANAJEAAAAAAP8AAAAA/wD/ACwAAAAAFAANAAECNQR8l6rc/SCUc1ZrQQg7KCGAgsVx\r\n3hGG42Ryn7pC7QnAcdMOg25nyr4b+CbB3RBSFB5/RUsBADs="))) fail("autocropped (0,0,0,0,1) image is not correct"); ok(); #test Image.Image->autocrop / border object img=Image.Image(20,20); img->box(4,4,8,8,Image.Color.red); img->box(8,8,12,12,Image.Color.green); img->box(12,4,16,8,Image.Color.blue); img->setcolor(255,255,255); if (img->autocrop(5)!= Image.GIF.decode(MIME.decode_base64( "R0lGODlhFwATAKIAAAAAAP8AAAAA/wD/AP///wAAAAAAAAAAACwAAAAAFwATAAIDVkiku+0OOgBo\r\nrRdjPPf2H9CFYTiWJbdsQdAGmCDIgkqwrhvPs43nO54Pk9NVeL3KqTgYNJE15arkdA5Kp43ViZ2G\r\ntleT9wPu3lKpYTqdXX/abnX8TUgAADs="))) fail("autocropped (border) image is not correct"); ok(); if (img->autocrop(5,0,0,0,1)!= Image.GIF.decode(MIME.decode_base64( "R0lGODlhHgAXAKIAAAAAAP8AAAAA/wD/AP///wAAAAAAAAAAACwAAAAAHgAXAAIDbUiku+0Oxjgp\r\ntfdmrXnvHwiKIwEAJ4qq67qOrhvLKEzTt43jrg4EAWBgJRAUBS+QKxgcooxGZE25agaJUSnAZ3UC\r\nslpuczAgg5MdXrk8wPlc7LKbSou3ae+VfZ7m8dAaf39TfYM8eYaAF4mHEQkAOw=="))) fail("autocropped (5,0,0,0,1) image is not correct"); if (img->autocrop(5,0,0,1,0)!= Image.GIF.decode(MIME.decode_base64( "R0lGODlhHgAaAKIAAAAAAP8AAAAA/wD/AP///wAAAAAAAAAAACwAAAAAHgAaAAIDdEiku+0OxjgJ\r\nABdjvfemlOeJIwZGZZkCp6OqZbt4QVAHmyDowifTNltut/O1gMEh0XhCCjHEoum3CQYGA2y0Nz2q\r\nstmBSmb5hsUxaumMHpFh7LEaBmPN63IvHvbe8+9+TCCBeU2EbmRkiYqKjI2Nj5CQko0JADs="))) fail("autocropped (5,0,0,1,0) image is not correct"); if (img->autocrop(5,0,1,0,0)!= Image.GIF.decode(MIME.decode_base64( "R0lGODlhGwAeAKIAAAAAAP8AAAAA/wD/AP///wAAAAAAAAAAACwAAAAAGwAeAAIDfEiku+0Oxjgp\r\ntfdmrXnvHwheAFCaJpqmqcayL2y6slzTts3iQBD4gZRAMBS0SKnfL2giEo0zpGn5Ez6hAB6VCbhi\r\ntcvBQOw9UnTj8cDGY6nHbCnsvZa1U/T4WaczR/p9UXuBOneEfg6HhXKKiAuNdiMjkpOTlZaWmJmZ\r\nHQkAOw=="))) fail("autocropped (5,0,1,0,0) image is not correct"); if (img->autocrop(5,1,0,0,0)!= Image.GIF.decode(MIME.decode_base64( "R0lGODlhGgAeAKIAAAAAAP8AAAAA/wD/AP///wAAAAAAAAAAACwAAAAAGgAeAAIDekiku+0Oxjgp\r\ntfdmrXnvH3gBAFmWJ4qi47q6L9DGcTzXNUutQdAHKIFAKNBFeD5fcDg0OpDJJdO5gCpLzGbplgwM\r\nBt9scburgcGD2m2FBqvLsXbaBn/J38dcjkrY78l5fzlrgiuEhYBPiHSBi3wiIpCRkZOUlJaXlwQJ\r\nADs="))) fail("autocropped (5,1,0,0,0) image is not correct"); ok();
aebf321998-04-16Mirar (Pontus Hagland) //-----------------------------------------------------------------------
8e781a1998-04-29Mirar (Pontus Hagland) #chapter testsuite III
aebf321998-04-16Mirar (Pontus Hagland)  #test equal, copy_value array a=({0,0,0}); array b=copy_value(a); b[0]=17; b[1]=42; b[2]=128; if (!equal( ({0,0,0}), a)) fail("differ (1)"); if (!equal( ({17,42,128}), b)) fail("differ (2)"); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->max()
aebf321998-04-16Mirar (Pontus Hagland)  if (!equal( ({0,0,0}),
7d36901999-06-19Mirar (Pontus Hagland)  Image.Image(10,10,0,0,0)->max() ))
aebf321998-04-16Mirar (Pontus Hagland)  fail("erranous (1)"); if (!equal( ({17,42,36}),
7d36901999-06-19Mirar (Pontus Hagland)  Image.Image(10,10,17,42,36)->max() ))
aebf321998-04-16Mirar (Pontus Hagland)  fail("erranous (2)"); if (!equal( ({17,42,36}),
7d36901999-06-19Mirar (Pontus Hagland)  Image.Image(10,10,0,0,0)
aebf321998-04-16Mirar (Pontus Hagland)  ->setpixel(5,5,17,42,36)->max() )) fail("erranous (3)"); if (!equal( ({17,42,36}),
7d36901999-06-19Mirar (Pontus Hagland)  Image.Image(10,10,0,0,0)
aebf321998-04-16Mirar (Pontus Hagland)  ->setpixel(2,2,1,2,3) ->setpixel(3,3,17,42,36) ->setpixel(4,4,3,2,1) ->max())) fail("erranous (4)");
acdcbc1998-04-19Mirar (Pontus Hagland)  if (!equal( ({17,42,36}),
7d36901999-06-19Mirar (Pontus Hagland)  Image.Image(10,10,0,0,0)
acdcbc1998-04-19Mirar (Pontus Hagland)  ->setpixel(2,2,17,2,3) ->setpixel(3,3,2,42,5) ->setpixel(4,4,3,2,36) ->max())) fail("erranous (5)");
aebf321998-04-16Mirar (Pontus Hagland)  ok(); //----------------------------------------------------------------------- #chapter plain #test setpixel, getpixel
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(10,10,255,0,0);
aebf321998-04-16Mirar (Pontus Hagland)  if (!equal(img->getpixel(5,5),({255,0,0}))) fail("getpixel erranous"); img->setpixel(5,5,1,2,3); if (!equal(img->getpixel(5,5),({1,2,3}))) fail("failed"); ok(); #test setpixel alpha
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(10,10,255,0,0);
aebf321998-04-16Mirar (Pontus Hagland)  img->setpixel(5,5,0,255,0,127); if (!equal(img->getpixel(5,5),({127,128,0}))) fail("failed"); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->line structure object img=Image.Image(100,100,0,0,0);
aebf321998-04-16Mirar (Pontus Hagland)  foreach (({40,50,60}),int z) { img->line(50-z,0,50,50,255,255,255); img->line(50-z,100,50,50,255,255,255);
5d0a351998-04-19Mirar (Pontus Hagland)  img->line(100,50+z,50,50,255,255,255);
aebf321998-04-16Mirar (Pontus Hagland)  img->line(100,50-z,50,50,255,255,255); } object img1=Image.GIF.decode(MIME.decode_base64(
5d0a351998-04-19Mirar (Pontus Hagland)  "R0lGODlhZABkAIAAAAAAAP///ywAAAAAZABkAAAC/wxwiGC7/l6UktZ6Mdatdr9toSiSZQmCjPihqPu+MdLST23Lsr7vGF7DrXw+YhEF3AiFx2NTFiwtnU5qMYpUVqvbrAT7/XG5Y3HYfD6TyWsw+vZms68qaTw3n/tazE/AvcCkpwcH95OkFkhIaGdYdwfIyDikePeIVzk5yacFdUmpOcfpIUiaiBnK5Wfp6YiaerT6SecKCrtX++o0mnnb+vrHyKvr+xgpKttbbDxLmGy77Hi86VoK28FnrfesTY3a7VwdjTc8HowJToZ9Ok6unLoemA6fOR+L3u5Fab/T8JzfaR89UPyKnYsnjFzBaP6IVWnoEGAjiKLcSXyYY6EihP8Xd2VkY8Cfxo7BKN4z2RHkCn4hI6Y8CS0LypcVW/ZbOZImCJsvSuq85hMJz5/wzrEYSrRonz85kwoFYtSpwagMqEr1xfRG06u4aGzliusrWFpjASIta1Ae2qnYrK51RjXr201u5c5FttTt3X561YqVmtVa0L2ezooxTDgM4sNVE2tZ/Njl25Ysh/zNF7SgzcsMP6qzzPkWxJEUQ4caHU4gWtQJVXM9+E7lPtOq6g38RxNhaJO0u7oeSFCn7mUc+07t1ft3zLTI23Fcfk0cZmXJg8cmTp02N5K5OEctN/3d33LVWXT3Rv0nbuM3a5XvmQv6r2+A47ME/35+zHmR8rdPj82eeM2ox45k/a1WoHwHrgWeLlYhwmCC31ni32cJWkYhYdM4yAqCEmboGDTdTBGiiPB1eNeGy1UIXHwrljjLNCxi9UYfMAZkiI034hhIAQA7"));
aebf321998-04-16Mirar (Pontus Hagland)  if (img!=img1) fail("differ"); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->line color object img=Image.Image(100,100,0,0,0);
aebf321998-04-16Mirar (Pontus Hagland)  img->line(40,0,0,40); if (!equal( ({0,0,0}), img->max() )) fail("differ (reset)"); img->line(10,10,20,20,128,13,42); if (!equal( ({128,13,42}), img->max() )) fail("differ (direct)"); img->setcolor(200,19,99); img->line(30,20,20,30); if (!equal( ({200,19,99}), img->max() )) fail("differ (setcolor)"); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->box structure object img=Image.Image(100,100,0,0,0);
5d0a351998-04-19Mirar (Pontus Hagland)  foreach (({40,60,50}),int z) { img->box(z,0,50,50,255,z,255); img->box(z,100,50,50,255,z,0); img->box(100,z,50,50,0,z,255); img->box(0,z,50,50,0,z,0); } object img1=Image.GIF.decode(MIME.decode_base64( "R0lGODlhZABkALMAAAAAAAAyAAA8AAAoAP8oAP8yAAAo/wAy/wA8//88AP8o//8y//88/wAAAAAAAAAAACwAAAAAZABkAAME/xAAOWe1Fue8OVAKGIbhwjAniqKe17ouHMcznZEkbq7rats/IFA4nORypV6PVSw2nU4bErlb+qJRbDY7zVWtjO1WPKZ1SV9rubxmf86K9NLtpkfhcfC1XudL4XI9fX2DZoB6TISEijeHiIuLkBZ4gXuRkYSUiGGYmJmOep6efZqPo6NspaGoqGOqYK2tW69qsrJOtHO3t0O5gry8f2eVicHBHr6Wx8eToLDMzI3Dm9HRzdOm1tHJxdrB3Jzex+DizOTl38616Lfn7LLu76jx8p709ZH3+J/Yq/uY+v65CSiwDMGCs9TpYjZgQEOHDiFGjDiRIkWLFy9mJMbAgAGPH/8/hhQpkmTJkidRatS4kiVLly8HcESJkmbNmjdLxoy5kydPhzNx4hQ6dOjPn0eRUgxatGjTokqVRuXJ1KlTqyqlStWqserVq18NbN06dukmsGDRfiRLlq3Ms2nTgm3blqxXuXJr1q0r9W7evCIDBBA8eHBhw4YRJ068mDFjxwEOHJA8eXJly5YxZ868mTNnzgIEhBYtmnTp0qdRo1a9enXrAggQxJYtm3bt2rdx49a9e/du166BBw8+nLgA2L59J1eunLly48ahR48uGnnz5texY8dNnXp376itb98+njx38ODRGxdv3nz75unTxw/O3r17++fly9df/f59/77tt5/lgMf995+BtQ044H71HXggeQsumF6DDz7YnDYEEJChhhpqWEACCYAYYoghIrRIhx2i+CGJJJJoIiEppuhhiy2W+GIdMsq4Yo0u3uhGjinuyGMCPv4I5IxD2ljkGEcimeSSZTRJgJA8Qslkk1TWaOUWUmbZ4pZZdJmkkmAOIeaYZTpx5pNpmonlmES2CcSaQ8o555to2kkDnVXqGQOfWvrpAqBfCuoBoT0amgGiZCoKAKNxOjoBpJJaQGmlj+LJZqWXcqppnZh2KqmojpKqqKmGoiqoqn6yqqerdsIqp6xt0pqmrYtEAAA7")); if (img!=img1) fail("differ"); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->box color object img=Image.Image(100,100,0,0,0);
5d0a351998-04-19Mirar (Pontus Hagland)  img->box(40,0,0,40); if (!equal( ({0,0,0}), img->max() )) fail("differ (reset)"); img->box(10,10,20,20,128,13,42); if (!equal( ({128,13,42}), img->max() )) fail("differ (direct)"); img->setcolor(200,19,99); img->box(30,20,20,30); if (!equal( ({200,19,99}), img->max() )) fail("differ (setcolor)"); ok(); //----------------------------------------------------- #chapter advanced drawing
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->polyfill 1 (right triangle 0.0, 0.2) object img=Image.Image(100,100,0,0,0);
acdcbc1998-04-19Mirar (Pontus Hagland)  float x=0,y=0.2; img->setcolor(255,254,253); img->polygone(({10+x,15+y,15+x,10+y,15+x,15+y}), ({20+x,15+y,25+x,15+y,20+x,10+y}), ({10+x,20+y,15+x,20+y,15+x,25+y}), ({20+x,25+y,25+x,20+y,20+x,20+y}), ({30+2*10+x,15+y,30+2*15+x,10+y,30+2*15+x,15+y}), ({30+2*20+x,15+y,30+2*25+x,15+y,30+2*20+x,10+y}), ({30+2*10+x,20+y,30+2*15+x,20+y,30+2*15+x,25+y}), ({30+2*20+x,25+y,30+2*25+x,20+y,30+2*20+x,20+y}), ({10+x,30+2*15+y,15+x,30+2*10+y,15+x,30+2*15+y}), ({20+x,30+2*15+y,25+x,30+2*15+y,20+x,30+2*10+y}), ({10+x,30+2*20+y,15+x,30+2*20+y,15+x,30+2*25+y}), ({20+x,30+2*25+y,25+x,30+2*20+y,20+x,30+2*20+y})); object img1=Image.GIF.decode(MIME.decode_base64( "R0lGODlhZABkAMQAAAAAAAICAgUFBQoKChYWFigoKC0tLTAwMDIyMjMyMj8/P1lYWFFRUHJycXp5eYyLi6OioaWlpK2srLW0s8vLyszLytbV1Ojn5vTz8vn49/z7+v/+/QAAAAAAAAAAAAAAACwAAAAAZABkAAQF/yAAiONYmiaapivLuu8byzJd1zeO6/ve+z5gMDgkEo3HY1KpZDabTyhUOp1WrVZsNrvlcr3fb1gsJpfLZzRafWSw3Osd4bF7EOLtDCsDx6fmGBs7Gxh2fjgMGYIpG3yHAIAbG4s1k4SGjyaJkyyTjnGRlpQyopd3j5ucjJ59X6Glg6WmhwYICLYst7cGaAW6uro7wMAIBZmZx8jIysvLzc7O0GUOFBTVLNbWDmgKE9nZ1jvg4BMKhwISlp2TEgJrAw0XsrGiFw0DmeiqJuzuePDy1OGod8+Zvk7tMgHcR2qDPXzRAKBjkXAZwB0PI6bwZ4KjM4g1QGrUOJIkSZMnT+6mVKmSZcuWL2HClDlzZk2bNnHmzLmTJ0+fP38GFSqUaNGiR5EiVbp0aVOnTqFGjTqV6hdjKbBadRaBRdetywpoYKFBK9hDEUYB2PD1rB+xajeUdesnbVy2dOPAvTs3bxm7d/H6vapBIL9JfQdbARxYsOIpBxIkkMxi8uQDjx9n1qyZc+fOn0GDFj169CMI4LBlg2D6yAJR6yYtaE0kgAXDIyxZCECbyGuGa2X3rn377u7hvoELRx7EdtzjzIO87jQ7enMLLKBb91HdRPftO3inEA8efHnz5tGnT7+ePXv379/Hly+ffv369/HjPxQCADs="));
3139761998-04-30Mirar (Pontus Hagland)  if (!(img-img1<16)) fail("differ too much");
acdcbc1998-04-19Mirar (Pontus Hagland)  if (!equal(img->max(),({255,254,253}))) fail("wrong maxcolor"); ok();
7d36901999-06-19Mirar (Pontus Hagland) #test Image.Image->polyfill 2 (right triangle -0.2, -0.2) object img=Image.Image(100,100,0,0,0);
acdcbc1998-04-19Mirar (Pontus Hagland)  float x=-0.2,y=-0.2; img->setcolor(255,254,253); img->polygone(({10+x,15+y,15+x,10+y,15+x,15+y}), ({20+x,15+y,25+x,15+y,20+x,10+y}), ({10+x,20+y,15+x,20+y,15+x,25+y}), ({20+x,25+y,25+x,20+y,20+x,20+y}), ({30+2*10+x,15+y,30+2*15+x,10+y,30+2*15+x,15+y}), ({30+2*20+x,15+y,30+2*25+x,15+y,30+2*20+x,10+y}), ({30+2*10+x,20+y,30+2*15+x,20+y,30+2*15+x,25+y}), ({30+2*20+x,25+y,30+2*25+x,20+y,30+2*20+x,20+y}), ({10+x,30+2*15+y,15+x,30+2*10+y,15+x,30+2*15+y}), ({20+x,30+2*15+y,25+x,30+2*15+y,20+x,30+2*10+y}), ({10+x,30+2*20+y,15+x,30+2*20+y,15+x,30+2*25+y}), ({20+x,30+2*25+y,25+x,30+2*20+y,20+x,30+2*20+y})); object img1=Image.GIF.decode(MIME.decode_base64( "R0lGODlhZABkANUAAAAAAAICAgUFBQcHBwoKChQUFBYWFh4eHiMjIyYmJS0tLTAwMDMyMigoKFFRUFlYWHp5eX9+fnJycYyLi56dnDIyMqOioaWlpMHBwMvLyszLytHQz9bV1Orp6Ojn5vTz8vz7+v/+/QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAZABkAAUG/0AAQDgcFo1GZDK5ZDKdz2dUKqVWq1csVrvddr1ecDg8JpPN53NarWa32284XD6f1+12fD6/5/P9f3+BgoKEhYVqAkmKiGQEWAMBjW0FFEkMEZNYBhMYWBUcD5KaWwUbGZchmaRGnB8hqFUVISGho6xJprCpqqyutLuywLWiuEO6wUMMwKuIv8OxUrPDxLeTAhQZGRkWSQ3b2w6FAQ8Y4ODcWN/o4BYNxsbw8fHz9PT29/f5ggIMDP7vjBD49w/BuAUECf4LKGWgQoUHWEUAFg3AMlodFCBqcAEEtWRPplHzIOGRRFoVL2bUxNEjxU8jS9KbmDLESlYtUcKkRdLkvf8IKW8aa1mRyaye+pKIM4JAo74GELAkkJk0aVWrVrFmzbqVK1evX7+GFSuWbNmyZ9GiVbt2bVu3buHGjTuXLl27d+/m1auXb9++fwEDFjx4cGHDhvlYs5b43oMkCxg2jmfAkxEGFybfm5AShGTNmgx8qJkZNKsJIJd5Nh36Vc0QpVkjQp2a1mrZgkTrvAwsNu48tGvb/vxbDQFz27oZWbctavHiz6FDlz59enXr1rFnz152QIUK3yUTAA8+AfczATi85A1MwvkzD9YrA+bB5/st6XfPp+X+Ppn4wtXnHxn5vdbfgGHEV5OACIaRXk0HNujFAykxKKEXASinTIQXbiEk2QH2ddihiCOOWKKJJqKYYoorssiiiy++GKOMMtJYY4034hYEADs="));
3139761998-04-30Mirar (Pontus Hagland)  if (!(img-img1<16)) fail("differ too much");
acdcbc1998-04-19Mirar (Pontus Hagland)  if (!equal(img->max(),({255,254,253}))) fail("wrong maxcolor"); ok();
0e756f1999-05-24Mirar (Pontus Hagland) //----------------------------------------------------- #chapter Image.Font #test instansiating default font if (!objectp(Image.Font())) fail("not object"); ok(); #test writing simple text with default font object f=Image.Font(); object i=f->write("hej"); if (i!=Image.PNM.decode(MIME.decode_base64("UDQKMTkgMTEK///gv/7gv//grzjglt7gth7gtv7gtv7gtx7g//7g//Hg"))) fail("incorrect"); ok(); #test writing multiple lines with default font object f=Image.Font(); object i=f->write("h","o"); if (i!=Image.PNM.decode(MIME.decode_base64("UDQKNyAyMwr+vr6ulra2trb+/v7+/s62tra2zv7+/g=="))) fail("incorrect"); ok();
acdcbc1998-04-19Mirar (Pontus Hagland) 
3139761998-04-30Mirar (Pontus Hagland)  //-----------------------------------------------------
0e756f1999-05-24Mirar (Pontus Hagland) #chapter Image.Colortable
3139761998-04-30Mirar (Pontus Hagland) 
ccedb81999-05-24Mirar (Pontus Hagland) #test colortable - black/white init & cast object c=Image.Colortable(({Image.Color.white,Image.Color.black})); array z=(array)c; if (sizeof(z)!=2) fail("didn't get two colors (black and white): "+((array(string))c)*", "); if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
b277341999-06-14Mirar (Pontus Hagland)  fail("didn't get black and white: "+((array(string))z)*", ");
ccedb81999-05-24Mirar (Pontus Hagland)  ok(); #test colortable - black/white normal
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  object c=Image.Colortable(({Image.Color.white,Image.Color.black})); img=c*img; array z=(array)Image.Colortable(img); if (sizeof(z)!=2)
b277341999-06-14Mirar (Pontus Hagland)  fail("didn't get two colors (black and white): "+((array(string))z)*", ");
7d36901999-06-19Mirar (Pontus Hagland)  if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&
ccedb81999-05-24Mirar (Pontus Hagland)  (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
b277341999-06-14Mirar (Pontus Hagland)  fail("didn't get black and white: "+((array(string))z)*", ");
ccedb81999-05-24Mirar (Pontus Hagland)  ok(); #test colortable - black/white floyd-steinberg
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  object c=Image.Colortable(({Image.Color.white,Image.Color.black})); c->floyd_steinberg(); img=c*img; array z=(array)Image.Colortable(img); if (sizeof(z)!=2)
b277341999-06-14Mirar (Pontus Hagland)  fail("didn't get two colors (black and white): "+((array(string))z)*", ");
ccedb81999-05-24Mirar (Pontus Hagland)  if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
b277341999-06-14Mirar (Pontus Hagland)  fail("didn't get black and white: "+((array(string))z)*", ");
ccedb81999-05-24Mirar (Pontus Hagland)  ok(); #test colortable - black/white ordered
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  object c=Image.Colortable(({Image.Color.white,Image.Color.black})); c->ordered(); img=c*img; array z=(array)Image.Colortable(img); if (sizeof(z)!=2)
b277341999-06-14Mirar (Pontus Hagland)  fail("didn't get two colors (black and white): "+((array(string))z)*", ");
ccedb81999-05-24Mirar (Pontus Hagland)  if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) && (z[1]!=Image.Color.black || z[0]!=Image.Color.white))
b277341999-06-14Mirar (Pontus Hagland)  fail("didn't get black and white: "+((array(string))z)*", ");
ccedb81999-05-24Mirar (Pontus Hagland)  ok();
3139761998-04-30Mirar (Pontus Hagland) #test colortable - standard
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(200,200)->test(42);
3139761998-04-30Mirar (Pontus Hagland)  img->tuned_box(50,50,150,150,({({0,0,0}),({255,0,0}),({0,255,0}),({0,0,255})}));
521e5c1999-04-17Henrik Grubbström (Grubba)  object c=Image.Colortable(img,1000)->cubicles(16,16,16,4);
3139761998-04-30Mirar (Pontus Hagland)  if (sizeof(c)<200) fail("too few colors"); object img1=(c*img);
c742a51998-04-30Mirar (Pontus Hagland)  if (!(img-img1<50)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");
3139761998-04-30Mirar (Pontus Hagland)  ok(); #test colortable - floyd-steinberg
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(200,200)->test(42);
3139761998-04-30Mirar (Pontus Hagland)  img->tuned_box(50,50,150,150,({({0,0,0}),({255,0,0}),({0,255,0}),({0,0,255})}));
521e5c1999-04-17Henrik Grubbström (Grubba)  object c=Image.Colortable(32,32,32)->floyd_steinberg();
3139761998-04-30Mirar (Pontus Hagland)  object img1=(c*img);
c742a51998-04-30Mirar (Pontus Hagland)  if (!(img-img1<50)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");
3139761998-04-30Mirar (Pontus Hagland)  ok(); #test colortable - ordered
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(200,200)->test(42);
3139761998-04-30Mirar (Pontus Hagland)  img->tuned_box(50,50,150,150,({({0,0,0}),({255,0,0}),({0,255,0}),({0,0,255})}));
521e5c1999-04-17Henrik Grubbström (Grubba)  object c=Image.Colortable(32,32,32)->ordered();
3139761998-04-30Mirar (Pontus Hagland)  object img1=(c*img); if (!(img-img1<32)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")"); ok(); //----------------------------------------------------- #chapter encoding/decoding #test Image.PNM.encode/decode
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(40);
3139761998-04-30Mirar (Pontus Hagland)  object img1=Image.PNM.decode(Image.PNM.encode(img)); if (img!=img1) fail("differ"); ok(); #test Image.GIF.encode/decode
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(41);
521e5c1999-04-17Henrik Grubbström (Grubba)  object c=Image.Colortable(img,250)->cubicles(10,10,10,1)->floyd_steinberg();
c742a51998-04-30Mirar (Pontus Hagland)  img=c*img;
3139761998-04-30Mirar (Pontus Hagland)  object img1=Image.GIF.decode(Image.GIF.encode(img));
c742a51998-04-30Mirar (Pontus Hagland)  if (img!=img1) fail("differ ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")"); ok(); #test Image.GIF.encode/decode colortable
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(42);
521e5c1999-04-17Henrik Grubbström (Grubba)  object c=Image.Colortable(img,256)->cubicles(16,16,16,1);
c742a51998-04-30Mirar (Pontus Hagland)  img=c*img; object img1=Image.GIF.decode(Image.GIF.encode(img,c)); if (img!=img1) fail("differ ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");
3139761998-04-30Mirar (Pontus Hagland)  ok(); #test Image.GIF.encode/decode colortable w/ floyd-steinberg
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
521e5c1999-04-17Henrik Grubbström (Grubba)  object c=Image.Colortable(img,256)->floyd_steinberg()->cubicles(16,16,16);
c742a51998-04-30Mirar (Pontus Hagland)  img=c*img;
3139761998-04-30Mirar (Pontus Hagland)  object img1=Image.GIF.decode(Image.GIF.encode(img,c)); if (!(img-img1<50)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")"); ok();
ccedb81999-05-24Mirar (Pontus Hagland) #test Image.AVS.encode/decode
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  if (Image.AVS.decode(Image.AVS.encode(img))!=img) fail("differ"); ok(); #test Image.BMP.encode/decode (truecolor)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  if (Image.BMP.decode(Image.BMP.encode(img))!=img) fail("differ"); ok();
1442e01999-06-01Mirar (Pontus Hagland) 
ccedb81999-05-24Mirar (Pontus Hagland) #test Image.BMP.encode/decode (8bpp)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  object c=Image.Colortable(img,256); img=c*img;
1442e01999-06-01Mirar (Pontus Hagland)  if (Image.BMP.decode(Image.BMP.encode(img,(["bpp":8])))!=img) fail("differ");
ccedb81999-05-24Mirar (Pontus Hagland)  ok(); #test Image.BMP.encode/decode (4bpp)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  object c=Image.Colortable(img,16); img=c*img;
1442e01999-06-01Mirar (Pontus Hagland)  if (Image.BMP.decode(Image.BMP.encode(img,(["bpp":4])))!=img) fail("differ");
ccedb81999-05-24Mirar (Pontus Hagland)  ok(); #test Image.BMP.encode/decode (1bpp)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
1442e01999-06-01Mirar (Pontus Hagland)  object c=Image.Colortable(img,2)->floyd_steinberg();
ccedb81999-05-24Mirar (Pontus Hagland)  img=c*img;
1442e01999-06-01Mirar (Pontus Hagland)  if (Image.BMP.decode(Image.BMP.encode(img,(["bpp":1])))!=img) fail("differ"); ok(); #test Image.BMP.encode/decode (8bpp rle first)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(400,100,Image.Color.red);
1442e01999-06-01Mirar (Pontus Hagland)  img->line(0,0,0,99,Image.Color.green); img->line(399,0,399,99,Image.Color.blue); object c=Image.Colortable(img,256); img=c*img; if (Image.BMP.decode(Image.BMP.encode(img,(["bpp":8,"rle":1])))!=img) fail("differ"); ok(); #test Image.BMP.encode/decode (4bpp rle first)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(400,100,Image.Color.red);
1442e01999-06-01Mirar (Pontus Hagland)  img->line(0,0,0,99,Image.Color.green); img->line(399,0,399,99,Image.Color.blue); object c=Image.Colortable(img,16); img=c*img; if (Image.BMP.decode(Image.BMP.encode(img,(["bpp":4,"rle":1])))!=img) fail("differ"); ok(); #test Image.BMP.encode/decode (8bpp rle second)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(99)->scale(400,100);
1442e01999-06-01Mirar (Pontus Hagland)  object c=Image.Colortable(img,256); img=c*img; if (Image.BMP.decode(Image.BMP.encode(img,(["bpp":8,"rle":1])))!=img) fail("differ"); ok(); #test Image.BMP.encode/decode (4bpp rle second)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(99)->scale(400,100);
1442e01999-06-01Mirar (Pontus Hagland)  object c=Image.Colortable(img,16); img=c*img; if (Image.BMP.decode(Image.BMP.encode(img,(["bpp":4,"rle":1])))!=img) fail("differ");
ccedb81999-05-24Mirar (Pontus Hagland)  ok(); #test Image.HRZ.encode/decode
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(256,240)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  img=Image.Colortable( ({"white","black","red","green"}) )*img; if (Image.HRZ.decode(Image.HRZ.encode(img))!=img) fail("differ"); ok(); #test Image.ILBM.encode/decode (4bpp)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  object c=Image.Colortable(img,16); img=c*img; if (Image.ILBM.decode(Image.ILBM.encode(img))!=img) fail("differ"); ok(); #test Image.PCX.encode/decode
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  if (Image.PCX.decode(Image.PCX.encode(img))!=img) fail("differ"); ok(); #test Image.PNM.encode/decode
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  if (Image.PNM.decode(Image.PNM.encode(img))!=img) fail("differ"); ok(); #test Image.TGA.encode/decode
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  if (Image.TGA.decode(Image.TGA.encode(img))!=img) fail("differ"); ok(); #test Image.XBM.encode/decode
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
ccedb81999-05-24Mirar (Pontus Hagland)  object c=Image.Colortable(({Image.Color.white,Image.Color.black})); img=c*img; if (Image.XBM.decode(Image.XBM.encode(img))!=img) fail("differ"); ok();
d8e7361999-05-24Mirar (Pontus Hagland) // #test Image.XCF.decode (no crash) // #if constant(Image.XCF.decode)
7d36901999-06-19Mirar (Pontus Hagland) // object img=Image.Image(100,100)->test(43);
d8e7361999-05-24Mirar (Pontus Hagland) // Image.XCF.decode(); // #else // werror(" (Image.XCF not available) "); // #endif // ok(); #test Image.XPM.encode/decode (16 colors) #if constant(Image.XPM.encode)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
d8e7361999-05-24Mirar (Pontus Hagland)  object c=Image.Colortable(img,16); img=c*img; if (Image.XPM.decode(Image.XPM.encode(img,(["colortable":c])))!=img) fail("differ"); #else werror(" (Image.XPM not available) "); #endif ok(); #test Image.XPM.encode/decode (4096 colors) #if constant(Image.XPM.encode)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
d8e7361999-05-24Mirar (Pontus Hagland)  object c=Image.Colortable(16,16,16); img=c*img; if (Image.XPM.decode(Image.XPM.encode(img,(["colortable":c])))!=img) fail("differ"); #endif ok(); #test Image.TIFF.encode/decode #if constant(Image.TIFF.encode)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
d8e7361999-05-24Mirar (Pontus Hagland)  if (Image.TIFF.decode(Image.TIFF.encode(img))!=img) fail("differ"); #else werror(" (Image.TIFF not available) "); #endif ok(); #test Image.XFace.encode/decode #if constant(Image.XFace.encode)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(48,48)->test(43);
d8e7361999-05-24Mirar (Pontus Hagland)  object c=Image.Colortable(({Image.Color.white,Image.Color.black})); c->floyd_steinberg(); img=c*img; if (Image.XFace.decode(Image.XFace.encode(img))!=img) fail("differ"); #else werror(" (Image.XFace not available) "); #endif ok(); #test Image.JPEG.encode/decode #if constant(Image.JPEG.encode)
7d36901999-06-19Mirar (Pontus Hagland)  object img=Image.Image(100,100)->test(43);
d8e7361999-05-24Mirar (Pontus Hagland)  object img1=Image.JPEG.decode(Image.JPEG.encode(img,(["quality":100]))); if (!(img-img1<10)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")"); #else werror(" (Image.JPEG not available) "); #endif ok();
ccedb81999-05-24Mirar (Pontus Hagland) 
d8e7361999-05-24Mirar (Pontus Hagland) //-----------------------------------------------------
0b06cf2000-07-27Per Hedbor // // Removed since they are not actively maintained, and is not really // used all that much anyway. :-) /per // // // #chapter Computer Vision Functions // // #test make_ascii // #if constant(Image.JPEG.encode) // object Stina=Image.JPEG.decode(MIME.decode_base64( // "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAABgcABQgE/8QANhAAAgEEAAQDAwkJAAAAAAAAAQIDAAQFEQYSITEHE3EiQYEUMjNCYXOhscEVIzY3UVJicsL/xAAZAQACAwEAAAAAAAAAAAAAAAACBAABAwX/xAAdEQACAgMBAQEAAAAAAAAAAAABAgARAyExEjJB/9oADAMBAAIRAxEAPwBcXMazCMT3wOjyhAOpPpXaOEs2bIXdhib2WJVIJW31sfO3vfpXXaWlrd35SUDn0PLHYg9/0p44HiS1yWIgCSwRXcQ8uW3kl8vlK9NjferZ1X65JlORVtBZmW7iSWFJreTzUZG5ikq6ZTrtqtQ+EuLixvh7jm8tRLcp5khDdT16b+FLDxltcZe5DFXWPlglyLs0d38nYHYGtA6+3dPvERfJ8JYwBQnJbouh00eUVRbViXbeR67MzeIRi4f8QLlLNFhVFdF+tok73+PauK3s5r20DLEsS82/PufYD0x48Ri8/wCPGVkybQPBYBWSCYjTyFQOx79wfhTNzj4+2w8sV9bxtC6FEhZRo9PcKFcwA3I7MpAAmbplvYomtXijcluUSxN8emvdRH4XAW0eYLHmlWVUHOSTqhG/hW1zTShnWLQ1pui9e1GvhwD+xrqYczefcMQT3IFBme01GMCn1uC1/byTsGtWKuDtXB67qxsM0l9bbyYhM8Oo9gA85Hp1owfwltZnaK1y1xBNolY/L3v0oLfgjHxZg2drkMjLfxvp0ktBErH7Dvr/AEregTMzctsJjocnx5gbVIIzbef50qqhGuXZ0a0Yw6dunuA+ND/CmDhxOItWe3C3xQhmce0P8d1ci7jZuQnUv9g70LVwQCSxiu8ROBpJc1LxJas0qzRrHcQbJ0yjQZT6dDSxzWdFgqRq9xJMy8qhm3yDtqtSMiSRGN0DK406nsd96UOd8PcFJxiTc/uIki505j0cH6o9DUpSNw1Y3UR7Jc3kq24V3uJ/ZCjZK799PPCY6LA4a2s9FgqDm9nR37/xroseG8bip2nsrSAvrQk5tsBVkyEqpCk/HdJ5snrQjmJaNmWkP0ll/sPzpdZz+Z0Hr/1UqU4nYs3I9F+ji9BVUf4kP3VSpVHsyWWMvYeo/OhTjT59v92f1qVKFvmFj+oL475g9Ksrbs1SpSB7Oj+T/9k=")); // // array(object) Stina4; // Stina4=Stina->orient4(); // Stina4[1]*=215; // Stina4[3]*=215; // string foo=Stina->make_ascii(@Stina4,40,2,4); // if (foo[0..200]!= // " /* *| || \n /-\\*-\\ */ || ----- || \n /* \\\\\\|| ||/// \\*\\ | \n +\\*-**|/| ||*X // | | \n \\\\ |* \\*\\--- // */ \n \\- |*| \\\\\\ // // \n ---/--//// \\\\\\//--// \n -\\*-|// \\|- \n1\0\0\0P\24\20@P\24\20@\b\0\0\08\0\0\0\4\0\6\0\200\35 \b\6\0\0\0\n"[0..200]) fail("Wrong ascii-picture"); // #endif // ok(); // // #test match_X float, object, void|object, void|int // #if constant(Image.JPEG.encode) // // object Stina=Image.JPEG.decode(MIME.decode_base64( // "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAABgcABQgE/8QANhAAAgEEAAQDAwkJAAAAAAAAAQIDAAQFEQYSITEHE3EiQYEUMjNCYXOhscEVIzY3UVJicsL/xAAZAQACAwEAAAAAAAAAAAAAAAACBAABAwX/xAAdEQACAgMBAQEAAAAAAAAAAAABAgARAyExEjJB/9oADAMBAAIRAxEAPwBcXMazCMT3wOjyhAOpPpXaOEs2bIXdhib2WJVIJW31sfO3vfpXXaWlrd35SUDn0PLHYg9/0p44HiS1yWIgCSwRXcQ8uW3kl8vlK9NjferZ1X65JlORVtBZmW7iSWFJreTzUZG5ikq6ZTrtqtQ+EuLixvh7jm8tRLcp5khDdT16b+FLDxltcZe5DFXWPlglyLs0d38nYHYGtA6+3dPvERfJ8JYwBQnJbouh00eUVRbViXbeR67MzeIRi4f8QLlLNFhVFdF+tok73+PauK3s5r20DLEsS82/PufYD0x48Ri8/wCPGVkybQPBYBWSCYjTyFQOx79wfhTNzj4+2w8sV9bxtC6FEhZRo9PcKFcwA3I7MpAAmbplvYomtXijcluUSxN8emvdRH4XAW0eYLHmlWVUHOSTqhG/hW1zTShnWLQ1pui9e1GvhwD+xrqYczefcMQT3IFBme01GMCn1uC1/byTsGtWKuDtXB67qxsM0l9bbyYhM8Oo9gA85Hp1owfwltZnaK1y1xBNolY/L3v0oLfgjHxZg2drkMjLfxvp0ktBErH7Dvr/AEregTMzctsJjocnx5gbVIIzbef50qqhGuXZ0a0Yw6dunuA+ND/CmDhxOItWe3C3xQhmce0P8d1ci7jZuQnUv9g70LVwQCSxiu8ROBpJc1LxJas0qzRrHcQbJ0yjQZT6dDSxzWdFgqRq9xJMy8qhm3yDtqtSMiSRGN0DK406nsd96UOd8PcFJxiTc/uIki505j0cH6o9DUpSNw1Y3UR7Jc3kq24V3uJ/ZCjZK799PPCY6LA4a2s9FgqDm9nR37/xroseG8bip2nsrSAvrQk5tsBVkyEqpCk/HdJ5snrQjmJaNmWkP0ll/sPzpdZz+Z0Hr/1UqU4nYs3I9F+ji9BVUf4kP3VSpVHsyWWMvYeo/OhTjT59v92f1qVKFvmFj+oL475g9Ksrbs1SpSB7Oj+T/9k=")); // // object Stinamini=Stina->copy(10, 5, 15, 25); // object Stinares=Stina->match_norm(0.00002, Stinamini, // Image.Image(63,33)->polyfill(({0,0,60,0,60,30})), 10); // object expected_result=Image.JPEG.decode(MIME.decode_base64( // "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIAAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAYFAwII/8QAJhAAAQMDAwQCAwAAAAAAAAAAAAECBAMFERKi0RMVIVExQzNBkv/EABkBAQADAQEAAAAAAAAAAAAAAAABAgMFBP/EACMRAAEDBAICAwEAAAAAAAAAAAEAAgQDBRHREqEUcRUhMVH/2gAMAwEAAhEDEQA/APn8GxaYMeTFc+tT1OR6pnUqeMJ6NFLJEc3LaK/0vJ53yWMOCuxHskmRTFRhGD70pYFG+1RGfNHcvIp2uG5MrR3LyR5TMZVvgpPLjkd6U4Ch7ZE1Y6O5eTq2zRFTK0dy8gymBG2KS78I70pkFP2mCnzR3u5Mm6xaEZaXRZp1Zz5VfXssyQ17uIWUq0V41M1XkYH8zpdrVPoRYzmVX6XK9VxhV/SGgl5iJ9+1eCYBD4zHHJVo96kUKYpsAwPe1RVbrFev5tq8Htl0hNbha213BNAjxWYx9q4vskO5Yb3tUC3OIj8pW2rwde8xcY621eCaAMVhRt9kt/AO9qiddYq/btXgzbnJoyEpdJ+rTnPhU9GeC7KDWHIWEi615FM03gYPvaAA2XMQABEAARAAEX//2Q==" // )); // if (!(Stinares-expected_result<80)) // fail("->match_norm(float f, object needle, object haystack_avoid, int foo) differ too much"); // // Stinares=Stina->match_norm(0.00002, Stinamini); // expected_result=Image.JPEG.decode(MIME.decode_base64( // "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIAAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAYFAwII/8QAJhAAAQMDAwQCAwAAAAAAAAAAAAECBAMFERKi0RMVIVExQzNBkv/EABkBAQADAQEAAAAAAAAAAAAAAAABAgMFBP/EACMRAAEDBAICAwEAAAAAAAAAAAEAAgQDBRHREqEUcRUhMVH/2gAMAwEAAhEDEQA/APn8GxaYMeTFc+tT1OR6pnUqeMJ6NFLJEc3LaK/0vJ53yWMOCuxHskmRTFRhGD70pYFG+1RGfNHcvIp2uG5MrR3LyR5TMZVvgpPLjkd6U4Ch7ZE1Y6O5eTq2zRFTK0dy8gymBG2KS78I70pkFP2mCnzR3u5Mm6xaEZaXRZp1Zz5VfXssyQ17uIWUq0V41M1XkYH8zpdrVPoRYzmVX6XK9VxhV/SGgl5iJ9+1eCYBD4zHHJVo96kUKYpsAwPe1RVbrFev5tq8Htl0hNbha213BNAjxWYx9q4vskO5Yb3tUC3OIj8pW2rwde8xcY621eCaAMVhRt9kt/AO9qiddYq/btXgzbnJoyEpdJ+rTnPhU9GeC7KDWHIWEi615FM03gYPvaAA2XMQABEAARAAEX//2Q==" // )); // if (!(Stinares-expected_result<80)) // fail("->match_norm(float f, object needle) differ too much"); // Stinares=Stina->match(0.00002, Stinamini); // expected_result=Image.JPEG.decode(MIME.decode_base64( // "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIAAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAUGAwII/8QAJhAAAgAFBAEEAwAAAAAAAAAAAAECBAURogMSE9EhM0NRUxUxQf/EABkBAAIDAQAAAAAAAAAAAAAAAAACAQMFBP/EAB8RAAICAgMBAQEAAAAAAAAAAAECAAQDEQWh0XExUf/aAAwDAQACEQMRAD8A+fwV6XJS8zLRR6unuiUbV9zXiyKSokpFDeHRyfZzvZRDozYr8JYsYxkQjR++TLA0WpSpWD2sn2eFTpT6sn2AsoYNwlhTokd+SADQKmyjduHJ9naGjSjV3o5Psg2kEZOCst+Ed+TMg0cVLkk/RyfZNqktoy/FxQbd17+W/gdM6udCUWeKzV8ZyORofzfk60ue0JaWig1I9sTjb/Tf8RQhrMqvfxfRmQK9ZGOzHr8zYwIMaAaH32aLVqsrG/VxfR4VRlPtxfRAACsgjNzdhjsgd+y+qlKqK/Li+jt+ZlbW5sX0ZoEGqhkrzllfwDv2aCKpyjfq4von1OZ0ZhaXFHu23v4a+CeB0wKp2JRY5TNnxnG4Gj99gAF0zYAAQgABCAAEJ//Z" // )); // if (!(Stinares-expected_result<80)) // fail("->match(float f, object needle) differ too much"); // // Stinares=Stina->match(0.00002, Stinamini,Image.Image(63,33)->polyfill(({0,0,60,0,60,30})), 10); // expected_result=Image.JPEG.decode(MIME.decode_base64( // "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIAAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAUGAwII/8QAJhAAAgAFBAEEAwAAAAAAAAAAAAECBAURogMSE9EhM0NRUxUxQf/EABkBAAIDAQAAAAAAAAAAAAAAAAACAQMFBP/EAB8RAAICAgMBAQEAAAAAAAAAAAECAAQDEQWh0XExUf/aAAwDAQACEQMRAD8A+fwV6XJS8zLRR6unuiUbV9zXiyKSokpFDeHRyfZzvZRDozYr8JYsYxkQjR++TLA0WpSpWD2sn2eFTpT6sn2AsoYNwlhTokd+SADQKmyjduHJ9naGjSjV3o5Psg2kEZOCst+Ed+TMg0cVLkk/RyfZNqktoy/FxQbd17+W/gdM6udCUWeKzV8ZyORofzfk60ue0JaWig1I9sTjb/Tf8RQhrMqvfxfRmQK9ZGOzHr8zYwIMaAaH32aLVqsrG/VxfR4VRlPtxfRAACsgjNzdhjsgd+y+qlKqK/Li+jt+ZlbW5sX0ZoEGqhkrzllfwDv2aCKpyjfq4von1OZ0ZhaXFHu23v4a+CeB0wKp2JRY5TNnxnG4Gj99gAF0zYAAQgABCAAEJ//Z" // )); // if (!(Stinares-expected_result<80)) // fail("->match(float f, object needle, object haystack_avoid, int foo) differ too much");
d8e7361999-05-24Mirar (Pontus Hagland) 
0b06cf2000-07-27Per Hedbor // Stinares=Stina->match_phase(0.00002, Stinamini,Image.Image(63,33)->polyfill(({0,0,60,0,60,30})), 10); // expected_result=Image.JPEG.decode(MIME.decode_base64( // "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIAAhEBAxEB/8QAGgABAQEBAAMAAAAAAAAAAAAAAAYFAgEDCP/EACUQAAEDAgUFAQEAAAAAAAAAAAABAgQFogMREiHRExVDUVMxM//EABkBAAIDAQAAAAAAAAAAAAAAAAACAQMEBf/EACQRAAEDAgYDAQEAAAAAAAAAAAEAAgQDEQUGFFFx0RIxkWEh/9oADAMBAAIRAxEAPwD5/Bs0iDGkxXPxsPU5HqmepU2yT0aSUSE5M24FzuTM+UxhsV2Y+ByZFMVGEWPPSlAVC0eE39wL3cnPaYXwvdyRq2bFWHL8oe3N+npTIKdKRCXwXu5OuzQvje7kNWz9UjL0o+i36elLAp1pMFPBe7ky6vEwIvR6LNOrVnuq+vY7JDXu8Qs0nB68akaryLDa+9tl7aTOjxYrmYuJpcr1XLSq7ZIaDazDb57XcEuCHxmOJJTx8bkUKYpsAsOe1TurEJfNa7g8d2hfax3BMgXSM3KtOYJR/vi34e1TJV4SL/a1eDt1Zhqm2PavBLANIz9QMwygLAN+HtUvdYX3tdwZtXl4Ero9F+rTqz2VPXszAOyO1jvILPJxevIpGk8Cx553QAF65SAAEIAAQgABC//Z" // )); // if (!(Stinares-expected_result<80)) // fail("->match_phase(float f, object needle, object haystack_avoid, int foo) differ too much"); // Stinares=Stina->match_phase(0.00002, Stinamini); // expected_result=Image.JPEG.decode(MIME.decode_base64( // "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIAAhEBAxEB/8QAGgABAQEBAAMAAAAAAAAAAAAAAAYFAgEDCP/EACUQAAEDAgUFAQEAAAAAAAAAAAABAgQFogMREiHRExVDUVMxM//EABkBAAIDAQAAAAAAAAAAAAAAAAACAQMEBf/EACQRAAEDAgYDAQEAAAAAAAAAAAEAAgQDEQUGFFFx0RIxkWEh/9oADAMBAAIRAxEAPwD5/Bs0iDGkxXPxsPU5HqmepU2yT0aSUSE5M24FzuTM+UxhsV2Y+ByZFMVGEWPPSlAVC0eE39wL3cnPaYXwvdyRq2bFWHL8oe3N+npTIKdKRCXwXu5OuzQvje7kNWz9UjL0o+i36elLAp1pMFPBe7ky6vEwIvR6LNOrVnuq+vY7JDXu8Qs0nB68akaryLDa+9tl7aTOjxYrmYuJpcr1XLSq7ZIaDazDb57XcEuCHxmOJJTx8bkUKYpsAsOe1TurEJfNa7g8d2hfax3BMgXSM3KtOYJR/vi34e1TJV4SL/a1eDt1Zhqm2PavBLANIz9QMwygLAN+HtUvdYX3tdwZtXl4Ero9F+rTqz2VPXszAOyO1jvILPJxevIpGk8Cx553QAF65SAAEIAAQgABC//Z" // )); // if (!(Stinares-expected_result<80)) // fail("->match_phase(float f, object needle) differ too much");
696aaf1999-08-06Henrik Wallin 
0b06cf2000-07-27Per Hedbor // #endif
d8e7361999-05-24Mirar (Pontus Hagland)  /*
0e756f1999-05-24Mirar (Pontus Hagland)  This is used to create more tests. Please don't remMIME.encode_base64ove!
d8e7361999-05-24Mirar (Pontus Hagland)  MIME.encode_base64(Image.JPEG.encode(Stinares)); */ ok();