pike.git / src / modules / Image / testsuite.in.in

version» Context lines:

pike.git/src/modules/Image/testsuite.in.in:1: - #module Image.image + // -*- pike -*- + // $Id: testsuite.in.in,v 1.19 1999/06/19 19:05:45 mirar Exp $ + #module Image.Image   {   //-----------------------------------------------------------------------   #chapter testsuite      #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();   
pike.git/src/modules/Image/testsuite.in.in:16:      #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    - #test Image.image() no image -  object img=Image.image(); + #test Image.Image() no image +  object img=Image.Image();    if (!img ||    img->xsize() ||    img->ysize()) fail("have size");    ok();    - #test Image.image() image -  object img=Image.image(100,100); + #test Image.Image() image +  object img=Image.Image(100,100);    if (!img ||    img->xsize()!=100 ||    img->ysize()!=100) fail("wrong size");    if (img!=0) fail("wrong color");    ok();    - #test Image.image() too big + #test Image.Image() too big    int x=1; while ((x<<1)>0) x=(x<<1)+1; -  if (!catch { Image.image(x,2); }) fail(x+"x2 permitted"); -  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"); +  if (!catch { Image.Image(x,2); }) fail(x+"x2 permitted"); +  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");    ok();    - #test Image.image() color -  object img=Image.image(1000,1000,17,42,96); + #test Image.Image() color +  object img=Image.Image(1000,1000,17,42,96);    if (!img ||    img->xsize()!=1000 ||    img->ysize()!=1000) fail("wrong size");    if (img!=({17,42,96})) fail("wrong color");    ok();    -  + //----------------------------------------------------- + #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(); +  +    //-----------------------------------------------------------------------   #chapter testsuite II    - #test Image.image->test(), == -  object img=Image.image(10,10); + #test Image.Image->test(), == +  object img=Image.Image(10,10);    img=img->test(42);    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    - #test Image.image->copy -  object img=Image.image(100,100)->test(42); + #test Image.Image->copy +  object img=Image.Image(100,100)->test(42);    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();    - #test Image.image->clear -  object img=Image.image(100,100)->test(42); + #test Image.Image->clear +  object img=Image.Image(100,100)->test(42);    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();    - #test Image.image->clone -  object img=Image.image(100,100)->test(42); + #test Image.Image->clone +  object img=Image.Image(100,100)->test(42);    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();    -  + #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(); +    //-----------------------------------------------------------------------   #chapter testsuite III      #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();    - #test Image.image->max() + #test Image.Image->max()    if (!equal( ({0,0,0}), -  Image.image(10,10,0,0,0)->max() )) +  Image.Image(10,10,0,0,0)->max() ))    fail("erranous (1)");    if (!equal( ({17,42,36}), -  Image.image(10,10,17,42,36)->max() )) +  Image.Image(10,10,17,42,36)->max() ))    fail("erranous (2)");    if (!equal( ({17,42,36}), -  Image.image(10,10,0,0,0) +  Image.Image(10,10,0,0,0)    ->setpixel(5,5,17,42,36)->max() ))    fail("erranous (3)");    if (!equal( ({17,42,36}), -  Image.image(10,10,0,0,0) +  Image.Image(10,10,0,0,0)    ->setpixel(2,2,1,2,3)    ->setpixel(3,3,17,42,36)    ->setpixel(4,4,3,2,1)    ->max()))    fail("erranous (4)");    if (!equal( ({17,42,36}), -  Image.image(10,10,0,0,0) +  Image.Image(10,10,0,0,0)    ->setpixel(2,2,17,2,3)    ->setpixel(3,3,2,42,5)    ->setpixel(4,4,3,2,36)    ->max()))    fail("erranous (5)");    ok();      //-----------------------------------------------------------------------   #chapter plain      #test setpixel, getpixel -  object img=Image.image(10,10,255,0,0); +  object img=Image.Image(10,10,255,0,0);    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 -  object img=Image.image(10,10,255,0,0); +  object img=Image.Image(10,10,255,0,0);    img->setpixel(5,5,0,255,0,127);    if (!equal(img->getpixel(5,5),({127,128,0}))) fail("failed");    ok();    - #test Image.image->line structure -  object img=Image.image(100,100,0,0,0); + #test Image.Image->line structure +  object img=Image.Image(100,100,0,0,0);    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);    img->line(100,50+z,50,50,255,255,255);    img->line(100,50-z,50,50,255,255,255);    }    object img1=Image.GIF.decode(MIME.decode_base64(    "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"));    if (img!=img1) fail("differ");    ok();    - #test Image.image->line color -  object img=Image.image(100,100,0,0,0); + #test Image.Image->line color +  object img=Image.Image(100,100,0,0,0);    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();    - #test Image.image->box structure -  object img=Image.image(100,100,0,0,0); + #test Image.Image->box structure +  object img=Image.Image(100,100,0,0,0);    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();    - #test Image.image->box color -  object img=Image.image(100,100,0,0,0); + #test Image.Image->box color +  object img=Image.Image(100,100,0,0,0);    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    - #test Image.image->polyfill 1 (right triangle 0.0, 0.2) -  object img=Image.image(100,100,0,0,0); + #test Image.Image->polyfill 1 (right triangle 0.0, 0.2) +  object img=Image.Image(100,100,0,0,0);    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}),
pike.git/src/modules/Image/testsuite.in.in:214:    ({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="));    if (!(img-img1<16)) fail("differ too much");    if (!equal(img->max(),({255,254,253}))) fail("wrong maxcolor");    ok();    - #test Image.image->polyfill 2 (right triangle -0.2, -0.2) -  object img=Image.image(100,100,0,0,0); + #test Image.Image->polyfill 2 (right triangle -0.2, -0.2) +  object img=Image.Image(100,100,0,0,0);    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}),
pike.git/src/modules/Image/testsuite.in.in:275:    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))    fail("didn't get black and white: "+((array(string))z)*", ");    ok();      #test colortable - black/white normal -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    object c=Image.Colortable(({Image.Color.white,Image.Color.black}));    img=c*img;    array z=(array)Image.Colortable(img);    if (sizeof(z)!=2)    fail("didn't get two colors (black and white): "+((array(string))z)*", "); -  if ((z[0]!=Image.Color.black || z1]!=Image.Color.white) && +  if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&    (z[1]!=Image.Color.black || z[0]!=Image.Color.white))    fail("didn't get black and white: "+((array(string))z)*", ");    ok();      #test colortable - black/white floyd-steinberg -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    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)    fail("didn't get two colors (black and white): "+((array(string))z)*", ");    if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&    (z[1]!=Image.Color.black || z[0]!=Image.Color.white))    fail("didn't get black and white: "+((array(string))z)*", ");    ok();      #test colortable - black/white ordered -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    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)    fail("didn't get two colors (black and white): "+((array(string))z)*", ");    if ((z[0]!=Image.Color.black || z[1]!=Image.Color.white) &&    (z[1]!=Image.Color.black || z[0]!=Image.Color.white))    fail("didn't get black and white: "+((array(string))z)*", ");    ok();      #test colortable - standard -  object img=Image.image(200,200)->test(42); +  object img=Image.Image(200,200)->test(42);    img->tuned_box(50,50,150,150,({({0,0,0}),({255,0,0}),({0,255,0}),({0,0,255})}));    object c=Image.Colortable(img,1000)->cubicles(16,16,16,4);    if (sizeof(c)<200) fail("too few colors");    object img1=(c*img);    if (!(img-img1<50)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");    ok();      #test colortable - floyd-steinberg -  object img=Image.image(200,200)->test(42); +  object img=Image.Image(200,200)->test(42);    img->tuned_box(50,50,150,150,({({0,0,0}),({255,0,0}),({0,255,0}),({0,0,255})}));    object c=Image.Colortable(32,32,32)->floyd_steinberg();    object img1=(c*img);    if (!(img-img1<50)) fail("differ too much ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");    ok();      #test colortable - ordered -  object img=Image.image(200,200)->test(42); +  object img=Image.Image(200,200)->test(42);    img->tuned_box(50,50,150,150,({({0,0,0}),({255,0,0}),({0,255,0}),({0,0,255})}));    object c=Image.Colortable(32,32,32)->ordered();    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 -  object img=Image.image(100,100)->test(40); +  object img=Image.Image(100,100)->test(40);    object img1=Image.PNM.decode(Image.PNM.encode(img));    if (img!=img1) fail("differ");    ok();      #test Image.GIF.encode/decode -  object img=Image.image(100,100)->test(41); +  object img=Image.Image(100,100)->test(41);    object c=Image.Colortable(img,250)->cubicles(10,10,10,1)->floyd_steinberg();    img=c*img;    object img1=Image.GIF.decode(Image.GIF.encode(img));    if (img!=img1) fail("differ ("+(img-img1)->max()[0]+","+(img-img1)->max()[1]+","+(img-img1)->max()[2]+","+")");    ok();      #test Image.GIF.encode/decode colortable -  object img=Image.image(100,100)->test(42); +  object img=Image.Image(100,100)->test(42);    object c=Image.Colortable(img,256)->cubicles(16,16,16,1);    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]+","+")");    ok();      #test Image.GIF.encode/decode colortable w/ floyd-steinberg -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    object c=Image.Colortable(img,256)->floyd_steinberg()->cubicles(16,16,16);    img=c*img;    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();      #test Image.AVS.encode/decode -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    if (Image.AVS.decode(Image.AVS.encode(img))!=img) fail("differ");    ok();      #test Image.BMP.encode/decode (truecolor) -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    if (Image.BMP.decode(Image.BMP.encode(img))!=img) fail("differ");    ok();         #test Image.BMP.encode/decode (8bpp) -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    object c=Image.Colortable(img,256);    img=c*img;    if (Image.BMP.decode(Image.BMP.encode(img,(["bpp":8])))!=img) fail("differ");    ok();      #test Image.BMP.encode/decode (4bpp) -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    object c=Image.Colortable(img,16);    img=c*img;    if (Image.BMP.decode(Image.BMP.encode(img,(["bpp":4])))!=img) fail("differ");    ok();      #test Image.BMP.encode/decode (1bpp) -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    object c=Image.Colortable(img,2)->floyd_steinberg();    img=c*img;    if (Image.BMP.decode(Image.BMP.encode(img,(["bpp":1])))!=img) fail("differ");    ok();      #test Image.BMP.encode/decode (8bpp rle first) -  object img=Image.image(400,100,Image.Color.red); +  object img=Image.Image(400,100,Image.Color.red);    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) -  object img=Image.image(400,100,Image.Color.red); +  object img=Image.Image(400,100,Image.Color.red);    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) -  object img=Image.image(100,100)->test(99)->scale(400,100); +  object img=Image.Image(100,100)->test(99)->scale(400,100);    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) -  object img=Image.image(100,100)->test(99)->scale(400,100); +  object img=Image.Image(100,100)->test(99)->scale(400,100);    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.HRZ.encode/decode -  object img=Image.image(256,240)->test(43); +  object img=Image.Image(256,240)->test(43);    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) -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    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 -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    if (Image.PCX.decode(Image.PCX.encode(img))!=img) fail("differ");    ok();      #test Image.PNM.encode/decode -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    if (Image.PNM.decode(Image.PNM.encode(img))!=img) fail("differ");    ok();      #test Image.TGA.encode/decode -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    if (Image.TGA.decode(Image.TGA.encode(img))!=img) fail("differ");    ok();      #test Image.XBM.encode/decode -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    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();      // #test Image.XCF.decode (no crash)   // #if constant(Image.XCF.decode) - // object img=Image.image(100,100)->test(43); + // object img=Image.Image(100,100)->test(43);   // Image.XCF.decode();   // #else   // werror(" (Image.XCF not available) ");   // #endif   // ok();      #test Image.XPM.encode/decode (16 colors)    #if constant(Image.XPM.encode) -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    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) -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    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) -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    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) -  object img=Image.image(48,48)->test(43); +  object img=Image.Image(48,48)->test(43);    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) -  object img=Image.image(100,100)->test(43); +  object img=Image.Image(100,100)->test(43);    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();         //----------------------------------------------------- - #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(); -  - //----------------------------------------------------- +    #chapter Computer Vision Functions      #test make_ascii      object Stina=Image.JPEG.decode(MIME.decode_base64( - "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a\r\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy\r\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIA\r\nAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAABgcABQgE/8QANhAAAgEEAAQDAwkJAAAAAAAAAQID\r\nAAQFEQYSITEHE3EiQYEUMjNCYXOhscEVIzY3UVJicsL/xAAZAQACAwEAAAAAAAAAAAAAAAACBAAB\r\nAwX/xAAdEQACAgMBAQEAAAAAAAAAAAABAgARAyExEjJB/9oADAMBAAIRAxEAPwBcXMazCMT3wOjy\r\nhAOpPpXaOEs2bIXdhib2WJVIJW31sfO3vfpXXaWlrd35SUDn0PLHYg9/0p44HiS1yWIgCSwRXcQ8\r\nuW3kl8vlK9NjferZ1X65JlORVtBZmW7iSWFJreTzUZG5ikq6ZTrtqtQ+EuLixvh7jm8tRLcp5khD\r\ndT16b+FLDxltcZe5DFXWPlglyLs0d38nYHYGtA6+3dPvERfJ8JYwBQnJbouh00eUVRbViXbeR67M\r\nzeIRi4f8QLlLNFhVFdF+tok73+PauK3s5r20DLEsS82/PufYD0x48Ri8/wCPGVkybQPBYBWSCYjT\r\nyFQOx79wfh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MBAQEAAAAAAAAAAAABAgARAyExEjJB/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");    ok();      #test match_X float, object, void|object, void|int      object Stina=Image.JPEG.decode(MIME.decode_base64( - "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a\r\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy\r\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIA\r\nAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAABgcABQgE/8QANhAAAgEEAAQDAwkJAAAAAAAAAQID\r\nAAQFEQYSITEHE3EiQYEUMjNCYXOhscEVIzY3UVJicsL/xAAZAQACAwEAAAAAAAAAAAAAAAACBAAB\r\nAwX/xAAdEQACAgMBAQEAAAAAAAAAAAABAgARAyExEjJB/9oADAMBAAIRAxEAPwBcXMazCMT3wOjy\r\nhAOpPpXaOEs2bIXdhib2WJVIJW31sfO3vfpXXaWlrd35SUDn0PLHYg9/0p44HiS1yWIgCSwRXcQ8\r\nuW3kl8vlK9NjferZ1X65JlORVtBZmW7iSWFJreTzUZG5ikq6ZTrtqtQ+EuLixvh7jm8tRLcp5khD\r\ndT16b+FLDxltcZe5DFXWPlglyLs0d38nYHYGtA6+3dPvERfJ8JYwBQnJbouh00eUVRbViXbeR67M\r\nzeIRi4f8QLlLNFhVFdF+tok73+PauK3s5r20DLEsS82/PufYD0x48Ri8/wC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AAAAAAAAAAAAACBAABAwX/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); +  Image.Image(63,33)->polyfill(({0,0,60,0,60,30})), 10);   object expected_result=Image.JPEG.decode(MIME.decode_base64( - "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a\r\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy\r\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIA\r\nAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAYFAwII/8QAJhAAAQMDAwQCAwAAAAAAAAAAAAEC\r\nBAMFERKi0RMVIVExQzNBkv/EABkBAQADAQEAAAAAAAAAAAAAAAABAgMFBP/EACMRAAEDBAICAwEA\r\nAAAAAAAAAAEAAgQDBRHREqEUcRUhMVH/2gAMAwEAAhEDEQA/APn8GxaYMeTFc+tT1OR6pnUqeMJ6\r\nNFLJEc3LaK/0vJ53yWMOCuxHskmRTFRhGD70pYFG+1RGfNHcvIp2uG5MrR3LyR5TMZVvgpPLjkd6\r\nU4Ch7ZE1Y6O5eTq2zRFTK0dy8gymBG2KS78I70pkFP2mCnzR3u5Mm6xaEZaXRZp1Zz5VfXssyQ17\r\nuIWUq0V41M1XkYH8zpdrVPoRYzmVX6XK9VxhV/SGgl5iJ9+1eCYBD4zHHJVo96kUKYpsAwPe1RVb\r\nrFev5tq8Htl0hNbha213BNAjxWYx9q4vskO5Yb3tUC3OIj8pW2rwde8xcY621eCaAMVhRt9kt/AO\r\n9qiddYq/btXgzbnJoyEpdJ+rTnPhU9GeC7KDWHIWEi615FM03gYPvaAA2XMQABEAARAAEX//2Q==" + "/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/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a\r\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy\r\nMjIyMjIyM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AABAgMFBP/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/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a\r\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy\r\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIA\r\nAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAUGAwII/8QAJhAAAgAFBAEEAwAAAAAAAAAAAAEC\r\nBAURogMSE9EhM0NRUxUxQf/EABkBAAIDAQAAAAAAAAAAAAAAAAACAQMFBP/EAB8RAAICAgMBAQEA\r\nAAAAAAAAAAECAAQDEQWh0XExUf/aAAwDAQACEQMRAD8A+fwV6XJS8zLRR6unuiUbV9zXiyKSokpF\r\nDe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ACsgjNzdhjsgd+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); +  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/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a\r\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy\r\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAhAD8DASIA\r\nAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAUGAwII/8QAJhAAAgAFBAEEAwAAAAAAAAAAAAEC\r\nBAURogMSE9EhM0NRUxUxQf/EABkBAAIDAQAAAAAAAAAAAAAAAAACAQMFBP/EAB8RAAICAgMBAQEA\r\nAAAAAAAAAAECAAQDEQWh0XExUf/aAAwDAQACEQMRAD8A+fwV6XJS8zLRR6unuiUbV9zXiyKSokpF\r\nDeHRyfZzvZRDozYr8JYsYxkQjR++TLA0WpSpWD2sn2eFTpT6sn2AsoYNwlhTokd+SADQKmyjduHJ\r\n9naGjSjV3o5Psg2kEZOCst+Ed+TMg0cVLkk/RyfZNqktoy/FxQbd17+W/gdM6udCUWeKzV8ZyORo\r\nfzfk60ue0JaWig1I9sTjb/Tf8RQhrMqvfxfRmQK9ZGOzHr8zYwIMaAaH32aLVqsrG/VxfR4VRlPt\r\nxfRAACsgjNzdhjsgd+y+qlKqK/Li+jt+ZlbW5sX0ZoEGqhkrzllfwDv2aCKpyjfq4von1OZ0ZhaX\r\nFHu23v4a+CeB0wKp2JRY5TNnxnG4Gj99gAF0zYAAQgABCAAEJ//Z" +  "/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");    -  Stinares=Stina->match_phase(0.00002, Stinamini,Image.image(63,33)->polyfill(({0,0,60,0,60,30})), 10); +  Stinares=Stina->match_ph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PTgyPC4zNDL/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/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a\r\nHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy\r\nMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAAR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AMBAAIRAxEAPwD5/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");       /*    This is used to create more tests. Please don't remMIME.encode_base64ove!       MIME.encode_base64(Image.JPEG.encode(Stinares));    */      ok();