From 3089dcdcf526393fb48f652bd04b7be2a62f26ff Mon Sep 17 00:00:00 2001 From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org> Date: Mon, 10 Nov 1997 15:19:58 +0100 Subject: [PATCH] doc update - wmml working Rev: src/modules/Image/doc-footer:1.3 Rev: src/modules/Image/encodings/pnm.c:1.3 Rev: src/modules/Image/image.c:1.59 Rev: src/modules/Image/mkwmml.pike:1.4 Rev: src/modules/Image/x.c:1.15 Rev: tutorial/Image.wmml:1.4 --- src/modules/Image/doc-footer | 1 + src/modules/Image/encodings/pnm.c | 21 +++- src/modules/Image/image.c | 14 ++- src/modules/Image/mkwmml.pike | 18 ++-- src/modules/Image/x.c | 6 +- tutorial/Image.wmml | 156 ++++++++++++++++-------------- 6 files changed, 123 insertions(+), 93 deletions(-) diff --git a/src/modules/Image/doc-footer b/src/modules/Image/doc-footer index 245ad49d3b..542ad6b71b 100644 --- a/src/modules/Image/doc-footer +++ b/src/modules/Image/doc-footer @@ -1,3 +1,4 @@ **! module Image **! note **! </pre></font> + diff --git a/src/modules/Image/encodings/pnm.c b/src/modules/Image/encodings/pnm.c index 291bd5668e..88d3891ace 100644 --- a/src/modules/Image/encodings/pnm.c +++ b/src/modules/Image/encodings/pnm.c @@ -1,9 +1,9 @@ -/* $Id: pnm.c,v 1.2 1997/11/02 18:50:31 grubba Exp $ */ +/* $Id: pnm.c,v 1.3 1997/11/10 14:19:58 mirar Exp $ */ /* **! module Image **! note -**! $Id: pnm.c,v 1.2 1997/11/02 18:50:31 grubba Exp $ +**! $Id: pnm.c,v 1.3 1997/11/10 14:19:58 mirar Exp $ **! submodule PNM **! **! This submodule keep the PNM encode/decode capabilities @@ -26,6 +26,21 @@ ** P7 - binary truecolor (used by xv for thumbnails) **! </pre> **! +**! Simple encoding:<br> +**! <ref>encode</ref>,<br> <ref>encode_binary</ref>,<br> +**! <ref>encode_ascii</ref> +**! +**! Simple decoding:<br> +**! <ref>decode</ref> +**! +**! Advanced encoding:<br> +**! <ref>encode_P1</ref>, <br> +**! <ref>encode_P2</ref>, <br> +**! <ref>encode_P3</ref>, <br> +**! <ref>encode_P4</ref>, <br> +**! <ref>encode_P5</ref>, <br> +**! <ref>encode_P6</ref> +**! **! see also: Image, Image.image, Image.GIF */ @@ -34,7 +49,7 @@ #include "stralloc.h" #include "global.h" -RCSID("$Id: pnm.c,v 1.2 1997/11/02 18:50:31 grubba Exp $"); +RCSID("$Id: pnm.c,v 1.3 1997/11/10 14:19:58 mirar Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" diff --git a/src/modules/Image/image.c b/src/modules/Image/image.c index 6d9ff24b3c..93344852c8 100644 --- a/src/modules/Image/image.c +++ b/src/modules/Image/image.c @@ -1,9 +1,9 @@ -/* $Id: image.c,v 1.58 1997/11/10 13:24:21 mirar Exp $ */ +/* $Id: image.c,v 1.59 1997/11/10 14:19:54 mirar Exp $ */ /* **! module Image **! note -**! $Id: image.c,v 1.58 1997/11/10 13:24:21 mirar Exp $ +**! $Id: image.c,v 1.59 1997/11/10 14:19:54 mirar Exp $ **! class image **! **! The main object of the <ref>Image</ref> module, this object @@ -58,17 +58,15 @@ **! <ref>distancesq</ref>, **! <ref>grey</ref>, **! <ref>invert</ref>, -**! <ref>map_closest</ref>, -**! <ref>map_fast</ref>, -**! <ref>select_colors</ref>, **! <ref>modify_by_intensity</ref>, **! <ref>select_from</ref>, **! <ref>rgb_to_hsv</ref>, -**! <ref>hsv_to_rgb</ref> +**! <ref>hsv_to_rgb</ref>, +**! <ref>Image.colortable</ref> **! **! converting to other datatypes: **! <ref>Image.GIF</ref>, -**! <ref>Image.PNG</ref> +**! <ref>Image.PNM</ref> **! **! special pattern drawing: **! <ref>noise</ref>, @@ -84,7 +82,7 @@ #include "stralloc.h" #include "global.h" -RCSID("$Id: image.c,v 1.58 1997/11/10 13:24:21 mirar Exp $"); +RCSID("$Id: image.c,v 1.59 1997/11/10 14:19:54 mirar Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" diff --git a/src/modules/Image/mkwmml.pike b/src/modules/Image/mkwmml.pike index 0413301320..00ee38a7fd 100644 --- a/src/modules/Image/mkwmml.pike +++ b/src/modules/Image/mkwmml.pike @@ -1,4 +1,4 @@ -/* $Id: mkwmml.pike,v 1.3 1997/11/10 13:30:02 mirar Exp $ */ +/* $Id: mkwmml.pike,v 1.4 1997/11/10 14:19:56 mirar Exp $ */ import Stdio; import Array; @@ -184,11 +184,17 @@ string htmlify(string s) string make_nice_reference(string what,string prefix) { string q; - if (search(what,".")==-1 && - search(what,"->")==-1 && - !parse[what] && - what!=prefix[strlen(prefix)-strlen(what)-2..strlen(prefix)-3] && - what!=prefix[strlen(prefix)-strlen(what)-1..strlen(prefix)-2]) + if (what==prefix[strlen(prefix)-strlen(what)-2..strlen(prefix)-3]) + { + q=prefix[0..strlen(prefix)-3]; + } + else if (what==prefix[strlen(prefix)-strlen(what)-1..strlen(prefix)-2]) + { + q=prefix[0..strlen(prefix)-2]; + } + else if (search(what,".")==-1 && + search(what,"->")==-1 && + !parse[what]) { q=prefix+what; } diff --git a/src/modules/Image/x.c b/src/modules/Image/x.c index 30571dcc5a..5324b9e4ca 100644 --- a/src/modules/Image/x.c +++ b/src/modules/Image/x.c @@ -1,4 +1,4 @@ -/* $Id: x.c,v 1.14 1997/11/08 00:10:03 grubba Exp $ */ +/* $Id: x.c,v 1.15 1997/11/10 14:19:57 mirar Exp $ */ /* **! module Image @@ -12,7 +12,7 @@ #include "stralloc.h" #include "global.h" -RCSID("$Id: x.c,v 1.14 1997/11/08 00:10:03 grubba Exp $"); +RCSID("$Id: x.c,v 1.15 1997/11/10 14:19:57 mirar Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -35,7 +35,7 @@ extern struct program *image_colortable_program; /* **! method string cast(string type) **! returns the image data as a string ("rgbrgbrgb...") -**! see also: toppm, togif, tozbgr, to8bit, to8bit_rgbcube +**! see also: Image.colortable **! bugs **! always casts to string... */ diff --git a/tutorial/Image.wmml b/tutorial/Image.wmml index 4f15251ef9..857fa31d69 100644 --- a/tutorial/Image.wmml +++ b/tutorial/Image.wmml @@ -1,5 +1,3 @@ -<chapter title="Image"> - <hr newpage> <anchor name=Image> <dl> @@ -27,29 +25,33 @@ This module adds image-drawing and -manipulating <td align=left valign=top><link to=Image.GIF>Image.GIF</link></td> <td align=left valign=top>GIF encoding/decoding capabilities</td> </tr> + <tr> + <td align=left valign=top><link to=Image.PNM>Image.PNM</link></td> + <td align=left valign=top>PNM (PBM/PGM/PPM) encoding/decoding capabilities</td> + </tr> </table> <p> <dt><encaps>NOTA BENE</encaps><dd> <font size=-1><pre>Image module documentation is based on these file versions: - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ - $Id: Image.wmml,v 1.3 1997/11/10 13:26:00 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ + $Id: Image.wmml,v 1.4 1997/11/10 14:19:41 mirar Exp $ </pre></font> <p> @@ -802,7 +804,7 @@ reduces the number of colors </table><p> <dt><encaps>RETURN VALUE</encaps><dd> -the new <link to=Image.colortable.colortable>colortable</link> object +the new <link to=Image.colortable>colortable</link> object <p> </dl> @@ -867,12 +869,12 @@ sums colortables <td align=left><font size=-2>argument(s)</font></td> <td align=left><font size=-2>description</font></td></tr> <tr align=left><td valign=top> -<tt>object(<link to=Image.colortable.colortable>colortable</link>) with</tt></td> <td valign=bottom><link to=Image.colortable.colortable>colortable</link> object with colors to add</td></tr> +<tt>object(<link to=Image.colortable>colortable</link>) with</tt></td> <td valign=bottom><link to=Image.colortable>colortable</link> object with colors to add</td></tr> </table><p> <dt><encaps>RETURN VALUE</encaps><dd> -the resulting new <link to=Image.colortable.colortable>colortable</link> object +the resulting new <link to=Image.colortable>colortable</link> object <p> </dl> @@ -900,12 +902,12 @@ subtracts colortables <td align=left><font size=-2>argument(s)</font></td> <td align=left><font size=-2>description</font></td></tr> <tr align=left><td valign=top> -<tt>object(<link to=Image.colortable.colortable>colortable</link>) with</tt></td> <td valign=bottom><link to=Image.colortable.colortable>colortable</link> object with colors to subtract</td></tr> +<tt>object(<link to=Image.colortable>colortable</link>) with</tt></td> <td valign=bottom><link to=Image.colortable>colortable</link> object with colors to subtract</td></tr> </table><p> <dt><encaps>RETURN VALUE</encaps><dd> -the resulting new <link to=Image.colortable.colortable>colortable</link> object +the resulting new <link to=Image.colortable>colortable</link> object <p> </dl> @@ -1224,17 +1226,15 @@ The main object of the <link to=Image>Image</link> module, this object <link to=Image.image.distancesq>distancesq</link>, <link to=Image.image.grey>grey</link>, <link to=Image.image.invert>invert</link>, - <link to=Image.image.map_closest>map_closest</link>, - <link to=Image.image.map_fast>map_fast</link>, - <link to=Image.image.select_colors>select_colors</link>, <link to=Image.image.modify_by_intensity>modify_by_intensity</link>, <link to=Image.image.select_from>select_from</link>, <link to=Image.image.rgb_to_hsv>rgb_to_hsv</link>, - <link to=Image.image.hsv_to_rgb>hsv_to_rgb</link> + <link to=Image.image.hsv_to_rgb>hsv_to_rgb</link>, + <link to=Image.colortable>Image.colortable</link> <p> converting to other datatypes: <link to=Image.GIF>Image.GIF</link>, - <link to=Image.PNG>Image.PNG</link> + <link to=Image.PNM>Image.PNM</link> <p> special pattern drawing: <link to=Image.image.noise>noise</link>, @@ -1360,7 +1360,7 @@ Applies a pixel-transform matrix, or filter, to the image. ({1,2,1})}) </pre> </td><td> - <illustration __from__='image.c line 2051' src=lena.gif> + <illustration __from__='image.c line 2049' src=lena.gif> return src->apply_matrix( ({({1,2,1}), @@ -1369,7 +1369,7 @@ Applies a pixel-transform matrix, or filter, to the image. ); </illustration> </td><td> - <illustration __from__='image.c line 2051' src=lena.gif> + <illustration __from__='image.c line 2049' src=lena.gif> return src; </illustration> @@ -1384,7 +1384,7 @@ Applies a pixel-transform matrix, or filter, to the image. ({-1,-1,-1})}) </pre> </td><td> - <illustration __from__='image.c line 2051' src=lena.gif> + <illustration __from__='image.c line 2049' src=lena.gif> return src->apply_matrix( ({({-1,-1,-1}), @@ -1402,7 +1402,7 @@ Applies a pixel-transform matrix, or filter, to the image. ({1, 1,1})}) </pre> </td><td> - <illustration __from__='image.c line 2051' src=lena.gif> + <illustration __from__='image.c line 2049' src=lena.gif> return src->apply_matrix( ({({1, 1,1}), @@ -1420,7 +1420,7 @@ Applies a pixel-transform matrix, or filter, to the image. ({0, 0,0})}) </pre> </td><td> - <illustration __from__='image.c line 2051' src=lena.gif> + <illustration __from__='image.c line 2049' src=lena.gif> return src->apply_matrix( ({({0, 0,0}), @@ -1438,7 +1438,7 @@ Applies a pixel-transform matrix, or filter, to the image. ({0,-1,-2})}), 128,128,128, 3 </pre> </td><td> - <illustration __from__='image.c line 2051' src=lena.gif> + <illustration __from__='image.c line 2049' src=lena.gif> return src->apply_matrix( ({({2, 1, 0}), @@ -1447,7 +1447,7 @@ Applies a pixel-transform matrix, or filter, to the image. ); </illustration> </td><td> - <illustration __from__='image.c line 2051' src=lena.gif> + <illustration __from__='image.c line 2049' src=lena.gif> return src->grey()->apply_matrix( ({({2, 1, 0}), @@ -1609,11 +1609,7 @@ the image data as a string ("rgbrgbrgb...") <p> <dt><encaps>SEE ALSO</encaps><dd> -<link to=Image.image.toppm>toppm</link>, - <link to=Image.image.togif>togif</link>, - <link to=Image.image.tozbgr>tozbgr</link>, - <link to=Image.image.to8bit>to8bit</link>, - <link to=Image.image.to8bit_rgbcube>to8bit_rgbcube</link> +<link to=Image.colortable>Image.colortable</link> <p> </dl> @@ -1831,9 +1827,9 @@ Colorize an image. <p> If no arguments are given, the current color is used as factors. <p> <table><tr valign=center> - <td><illustration __from__='image.c line 1360' src=lena.gif> + <td><illustration __from__='image.c line 1358' src=lena.gif> return src; </illustration></td> - <td><illustration __from__='image.c line 1360' src=lena.gif> + <td><illustration __from__='image.c line 1358' src=lena.gif> return src->color(128,128,255); </illustration></td> </tr><tr valign=center> <td>original</td> @@ -2059,9 +2055,9 @@ Makes an grey-scale image, for alpha-channel use. </pre> <p> <table><tr valign=center> - <td><illustration __from__='image.c line 1788' src=lena.gif> + <td><illustration __from__='image.c line 1786' src=lena.gif> return src; </illustration></td> - <td><illustration __from__='image.c line 1788' src=lena.gif> + <td><illustration __from__='image.c line 1786' src=lena.gif> return src->distancesq(255,0,128); </illustration></td> </tr><tr valign=center> <td>original</td> @@ -2171,13 +2167,13 @@ color of the requested pixel -- ({int red,int green,int blue}) <anchor name=Image.image.gif_begin> <anchor name=Image.image.gif_add> <anchor name=Image.image.gif_end> -<anchor name=Image.image.togif> -<anchor name=Image.image.gif_add_fs_nomap> <anchor name=Image.image.gif_netscape_loop> +<anchor name=Image.image.gif_add_nomap> +<anchor name=Image.image.gif_add_fs_nomap> +<anchor name=Image.image.togif> <anchor name=Image.image.togif_fs> <anchor name=Image.image.gif_add_fs> <anchor name=Image.image.gif_add*> -<anchor name=Image.image.gif_add_nomap> <dl> <dt><encaps>NAME</encaps><dd> <tt>Image.image->gif_add</tt><br> @@ -2273,11 +2269,11 @@ Makes a grey-scale image (with weighted values). <p> <table><tr valign=center> - <td><illustration __from__='image.c line 1289' src=lena.gif> + <td><illustration __from__='image.c line 1287' src=lena.gif> return src; </illustration></td> - <td><illustration __from__='image.c line 1289' src=lena.gif> + <td><illustration __from__='image.c line 1287' src=lena.gif> return src->grey(); </illustration></td> - <td><illustration __from__='image.c line 1289' src=lena.gif> + <td><illustration __from__='image.c line 1287' src=lena.gif> return src->grey(0,0,255); </illustration></td> </tr><tr valign=center> <td>original</td> @@ -2336,31 +2332,31 @@ Converts RGB data to HSV data, or the other way around. the pixels as above. <p> <table><tr valign=center> - <td><illustration __from__='image.c line 1576' src=lena.gif> + <td><illustration __from__='image.c line 1574' src=lena.gif> return src; </illustration></td> - <td><illustration __from__='image.c line 1576' src=lena.gif> + <td><illustration __from__='image.c line 1574' src=lena.gif> return src->hsv_to_rgb(); </illustration></td> - <td><illustration __from__='image.c line 1576' src=lena.gif> + <td><illustration __from__='image.c line 1574' src=lena.gif> return src->rgb_to_hsv(); </illustration></td> </tr><tr valign=center> <td>original</td> <td>->hsv_to_rgb();</td> <td>->rgb_to_hsv();</td> </tr><tr valign=center> - <td><illustration __from__='image.c line 1576' src=lena.gif> + <td><illustration __from__='image.c line 1574' src=lena.gif> return image(67,67)->tuned_box(0,0, 67,67, ({ ({ 255,255,128 }), ({ 0,255,128 }), ({ 255,255,255 }), ({ 0,255,255 })})); </illustration></td> - <td><illustration __from__='image.c line 1576' src=lena.gif> + <td><illustration __from__='image.c line 1574' src=lena.gif> return image(67,67)->tuned_box(0,0, 67,67, ({ ({ 255,255,128 }), ({ 0,255,128 }), ({ 255,255,255 }), ({ 0,255,255 })})) ->hsv_to_rgb(); </illustration></td> - <td><illustration __from__='image.c line 1576' src=lena.gif> + <td><illustration __from__='image.c line 1574' src=lena.gif> return image(67,67)->tuned_box(0,0, 67,67, ({ ({ 255,255,128 }), ({ 0,255,128 }), @@ -2424,11 +2420,11 @@ Invert an image. Each pixel value gets to be 255-x, where x is the old value. <p> <table><tr valign=center> - <td><illustration __from__='image.c line 1443' src=lena.gif> + <td><illustration __from__='image.c line 1441' src=lena.gif> return src; </illustration></td> - <td><illustration __from__='image.c line 1443' src=lena.gif> + <td><illustration __from__='image.c line 1441' src=lena.gif> return src->invert(); </illustration></td> - <td><illustration __from__='image.c line 1443' src=lena.gif> + <td><illustration __from__='image.c line 1441' src=lena.gif> return src->rgb_to_hsv()->invert()->hsv_to_rgb(); </illustration></td> </tr><tr valign=center> <td>original</td> @@ -2620,9 +2616,9 @@ Recolor an image from intensity values. representing intensity values between, linear. <p> <table><tr valign=center> - <td><illustration __from__='image.c line 2297' src=lena.gif> + <td><illustration __from__='image.c line 2295' src=lena.gif> return src; </illustration></td> - <td><illustration __from__='image.c line 2297' src=lena.gif> + <td><illustration __from__='image.c line 2295' src=lena.gif> return src->grey()->modify_by_intensity(1,0,0,0,({255,0,0}),({0,255,0})); </illustration></td> </tr><tr valign=center> <td>original</td> @@ -2967,10 +2963,10 @@ This function is new (april-97) and rather untested. <hr newpage> -<anchor name=Image.image.write_lsb_grey> +<anchor name=Image.image.write_lsb_rgb> <anchor name=Image.image.read_lsb_grey> +<anchor name=Image.image.write_lsb_grey> <anchor name=Image.image.read_lsb_rgb> -<anchor name=Image.image.write_lsb_rgb> <dl> <dt><encaps>NAME</encaps><dd> <tt>Image.image->read_lsb_grey</tt><br> @@ -3017,8 +3013,8 @@ the current object or the read string <hr newpage> -<anchor name=Image.image.rotate> <anchor name=Image.image.rotate_expand> +<anchor name=Image.image.rotate> <dl> <dt><encaps>NAME</encaps><dd> <tt>Image.image->rotate</tt><br> @@ -3521,9 +3517,9 @@ Makes a black-white image. for threshold values. <p> <table><tr valign=center> - <td><illustration __from__='image.c line 1498' src=lena.gif> + <td><illustration __from__='image.c line 1496' src=lena.gif> return src; </illustration></td> - <td><illustration __from__='image.c line 1498' src=lena.gif> + <td><illustration __from__='image.c line 1496' src=lena.gif> return src->threshold(90,100,110); </illustration></td> </tr><tr valign=center> <td>original</td> @@ -3601,11 +3597,11 @@ Draws a filled rectangle with colors (and alpha values) tuned rectangle. <p> <table><tr valign=center> - <td><illustration __from__='image.c line 1136' src=lena.gif> + <td><illustration __from__='image.c line 1134' src=lena.gif> return src; </illustration></td> - <td><illustration __from__='image.c line 1136' src=lena.gif> + <td><illustration __from__='image.c line 1134' src=lena.gif> return src->copy()->tuned_box(0,0,src->xsize(),src->ysize(),({({255,0,0}),({0,255,0}),({0,0,255}),({255,255,0})})); </illustration></td> - <td><illustration __from__='image.c line 1136' src=lena.gif> + <td><illustration __from__='image.c line 1134' src=lena.gif> return src->copy()->tuned_box(0,0,src->xsize(),src->ysize(),({({255,0,0,255}),({0,255,0,128}),({0,0,255,128}),({255,255,0})})); </illustration></td> </tr><tr valign=center> <td>original</td> @@ -4561,6 +4557,21 @@ This submodule keep the PNM encode/decode capabilities P5(PGM) - binary greymap P6(PPM) - binary truecolor </pre> + +<p> Simple encoding:<br> + <link to=Image.PNM.encode>encode</link>,<br> <link to=Image.PNM.encode_binary>encode_binary</link>,<br> + <link to=Image.PNM.encode_ascii>encode_ascii</link> + +<p> Simple decoding:<br> + <link to=Image.PNM.decode>decode</link> + +<p> Advanced encoding:<br> + <link to=Image.PNM.encode_P1>encode_P1</link>, <br> + <link to=Image.PNM.encode_P2>encode_P2</link>, <br> + <link to=Image.PNM.encode_P3>encode_P3</link>, <br> + <link to=Image.PNM.encode_P4>encode_P4</link>, <br> + <link to=Image.PNM.encode_P5>encode_P5</link>, <br> + <link to=Image.PNM.encode_P6>encode_P6</link> <p> <dt><encaps>SEE ALSO</encaps><dd> @@ -4604,8 +4615,8 @@ This function may throw errors upon illegal PNM data. <hr newpage> -<anchor name=Image.PNM.encode_binary> <anchor name=Image.PNM.encode> +<anchor name=Image.PNM.encode_binary> <anchor name=Image.PNM.encode_P6> <dl> <dt><encaps>NAME</encaps><dd> @@ -4654,4 +4665,3 @@ the encoded image as a string -</chapter> \ No newline at end of file -- GitLab