From 940b58203b9c4700f1cefc9a2920dec0bcf5a0f3 Mon Sep 17 00:00:00 2001 From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org> Date: Wed, 26 May 1999 00:39:27 +0200 Subject: [PATCH] fixed gif encoder / ppm decoder Rev: tutorial/Wmml.pmod:1.23 --- tutorial/Wmml.pmod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorial/Wmml.pmod b/tutorial/Wmml.pmod index 5c67526dd1..2bedb57716 100644 --- a/tutorial/Wmml.pmod +++ b/tutorial/Wmml.pmod @@ -853,7 +853,7 @@ mapping srccache=([]); string mkgif(mixed o) { - string g=stringp(o)?o:o->togif(); + string g=stringp(o)?o:Image.GIF.encode(o); int key=hash(g); @@ -969,7 +969,7 @@ string image_to_gif(TAG data, float dpi) werror("Converting "); Process.system("/bin/sh -c 'fig2dev -L ps "+params->src+" ___tmp.ps;echo showpage >>___tmp.ps'"); Process.system("/bin/sh -c 'gs -q -sDEVICE=pbmraw -r225 -g2500x2500 -sOutputFile=___tmp.ppm ___tmp.ps </dev/null >/dev/null'"); - object o=Image.image()->fromppm(Stdio.read_file("___tmp.ppm"))->autocrop()->scale(1.0/3)->rotate(-90); + object o=Image.PNM.decode(Stdio.read_file("___tmp.ppm"))->autocrop()->scale(1.0/3)->rotate(-90); o=Image.image(o->xsize()+40, o->ysize()+40, 255,255,255)->paste(o,20,20); rm("___tmp.ps"); rm("___tmp.ppm"); -- GitLab