diff --git a/src/modules/Image/doc/Image.colortable.html b/src/modules/Image/doc/Image.colortable.html new file mode 100644 index 0000000000000000000000000000000000000000..93f2999072dd0ceb92aa21fef3175b2fa4c9f4f6 --- /dev/null +++ b/src/modules/Image/doc/Image.colortable.html @@ -0,0 +1,15 @@ +<title>Pike documentation: Image.colortable</title> +<h2>Image.colortable</h2> + + +<blockquote> +This object keeps colortable information, + mostly for image re-coloring (quantization). +</blockquote> + + +<h4>SEE ALSO</h4> +<blockquote> <tt><a href=Image.html>Image</a></tt>, + <tt><a href=Image.image.html>Image.image</a></tt>, + <tt><a href=Image.font.html>Image.font</a></tt> +</blockquote> diff --git a/src/modules/Image/doc/Image.image.html b/src/modules/Image/doc/Image.image.html index 727507d0766d334f3bcc646234dba327f9c96233..65b32301afd100b1f13f78446613eeb404592c8a 100644 --- a/src/modules/Image/doc/Image.image.html +++ b/src/modules/Image/doc/Image.image.html @@ -543,31 +543,47 @@ the object called <hr> <a name=cast> </a> +<a name=to8bit> </a> +<a name=to8bit_closest> </a> +<a name=to8bit_fs> </a> <h4>SYNOPSIS</h4> <blockquote> -<tt>string <b>cast</b>(string type)</tt> +<tt>string <b>cast</b>(string type)<br> +string <b>to8bit</b>(array(array(int)) colors)<br> +string <b>to8bit_fs</b>(array(array(int)) colors)<br> +string <b>to8bit_closest</b>(array(array(int)) colors)</tt> </blockquote> <h4>DESCRIPTION</h4> <blockquote> -known bugs: always casts to string... +Maps the image to the given colors and returns + the 8 bit data. + +<p> to8bit_fs uses floyd-steinberg dithering </blockquote> <h4>RETURNS</h4> <blockquote> -the image data as a string ("rgbrgbrgb...") +the calculated string +</blockquote> + + +<h4>KNOWN BUGS</h4> +<blockquote> +always casts to string... </blockquote> <h4>SEE ALSO</h4> -<blockquote> <tt><a href=Image.image.html#toppm>toppm</a></tt>, - <tt><a href=Image.image.html#togif>togif</a></tt>, +<blockquote> <tt><a href=Image.image.html#to8bit_rgbcube>to8bit_rgbcube</a></tt>, <tt><a href=Image.image.html#tozbgr>tozbgr</a></tt>, - <tt><a href=Image.image.html#to8bit>to8bit</a></tt>, - <tt><a href=Image.image.html#to8bit_rgbcube>to8bit_rgbcube</a></tt> + <tt><a href=Image.image.html#map_fast>map_fast</a></tt>, + <tt><a href=Image.image.html#map_closest>map_closest</a></tt>, + <tt><a href=Image.image.html#select_colors>select_colors</a></tt>, + <tt><a href=Image.image.html#tobitmap>tobitmap</a></tt> </blockquote> <hr> @@ -1004,7 +1020,6 @@ Reads GIF data to the called image object. <blockquote><dl> <dt><tt>string pnm</tt> <dd>pnm data, as a string - known bugs: yes, it does -- it may even do segment overrides... </dl></blockquote> <h4>RETURNS</h4> @@ -1014,6 +1029,12 @@ the called object </blockquote> +<h4>KNOWN BUGS</h4> +<blockquote> +yes, it does -- it may even do segment overrides... +</blockquote> + + <h4>SEE ALSO</h4> <blockquote> <tt><a href=Image.image.html#togif>togif</a></tt>, <tt><a href=Image.image.html#frompnm>frompnm</a></tt> @@ -1139,6 +1160,7 @@ Makes a GIF (sub)image data chunk, to be placed img2->gif_add(0,0,100)+ img1->gif_end()); // voila, a gif animation... + </pre> </blockquote> <h4>ARGUMENTS</h4> <blockquote><dl> @@ -2112,43 +2134,6 @@ Skews an image an amount of pixels or a factor; the new image object </blockquote> -<hr> -<a name=to8bit> </a> -<a name=to8bit_closest> </a> -<a name=to8bit_fs> </a> -<h4>SYNOPSIS</h4> -<blockquote> -<tt>string <b>to8bit</b>(array(array(int)) colors)<br> -string <b>to8bit_fs</b>(array(array(int)) colors)<br> -string <b>to8bit_closest</b>(array(array(int)) colors)</tt> -</blockquote> - -<h4>DESCRIPTION</h4> - - -<blockquote> -Maps the image to the given colors and returns - the 8 bit data. - -<p> to8bit_fs uses floyd-steinberg dithering -</blockquote> -<h4>RETURNS</h4> - - -<blockquote> -the calculated string -</blockquote> - - -<h4>SEE ALSO</h4> -<blockquote> <tt><a href=Image.image.html#to8bit_rgbcube>to8bit_rgbcube</a></tt>, - <tt><a href=Image.image.html#tozbgr>tozbgr</a></tt>, - <tt><a href=Image.image.html#map_fast>map_fast</a></tt>, - <tt><a href=Image.image.html#map_closest>map_closest</a></tt>, - <tt><a href=Image.image.html#select_colors>select_colors</a></tt>, - <tt><a href=Image.image.html#tobitmap>tobitmap</a></tt> -</blockquote> - <hr> <a name=to8bit_rgbcube> </a> <a name=to8bit_rgbcube_rdither> </a> diff --git a/src/modules/Image/mkdoc.pike b/src/modules/Image/mkdoc.pike index 39a328c2a2c2a18c0aff993d290fd91c45a58dd9..5d48963472a5976709dad5913553242d5b6af8c3 100644 --- a/src/modules/Image/mkdoc.pike +++ b/src/modules/Image/mkdoc.pike @@ -20,6 +20,7 @@ module : mapping <- moduleM "returns" : textline "see also" : array of references "note" : mapping of "desc": text + "known bugs" : mapping of "desc": text "args" : array of mappings <- argM "args" : array of args names and types "desc" : description @@ -81,6 +82,12 @@ mapping keywords= return complain("note w/o method, class or module"); descM=nowM->note||(nowM->note=(["_line":line])); }, + "bugs":lambda(string arg,int line) + { + if (!lower_nowM()) + return complain("bugs w/o method, class or module"); + descM=nowM->bugs||(nowM->bugs=(["_line":line])); + }, "see":lambda(string arg,int line) { if (arg[0..4]!="also:") @@ -188,6 +195,10 @@ string standard_doc(mapping info,string myprefix) res+="\n\n<h4>NOTE</h4>\n<blockquote>\n"+ fixdesc(info->note->desc,myprefix)+"\n</blockquote>\n"; + if (info->bugs && info->bugs->desc) + res+="\n\n<h4>KNOWN BUGS</h4>\n<blockquote>\n"+ + fixdesc(info->bugs->desc,myprefix)+"\n</blockquote>\n"; + if (info["see also"]) { res+= @@ -299,6 +310,12 @@ void document_method(object(File) f, fixdesc(method->note->desc,prefix)+"\n</blockquote>\n"); } + if (method->bugs && method->bugs->desc) + { + f->write("\n\n<h4>KNOWN BUGS</h4>\n<blockquote>\n"+ + fixdesc(method->bugs->desc,prefix)+"\n</blockquote>\n"); + } + if (method["see also"]) { f->write("\n\n<h4>SEE ALSO</h4>\n<blockquote> " + diff --git a/src/modules/Image/togif.c b/src/modules/Image/togif.c index 7c5112f634ab1cfb56a675bd72adf747bbfdf58a..0274a461e0a0b2e79c9bdb0c62b3b1b0b8070980 100644 --- a/src/modules/Image/togif.c +++ b/src/modules/Image/togif.c @@ -4,7 +4,7 @@ togif Pontus Hagland, law@infovav.se -$Id: togif.c,v 1.8 1997/05/05 20:59:05 hubbe Exp $ +$Id: togif.c,v 1.9 1997/05/05 21:35:06 mirar Exp $ */ @@ -462,7 +462,8 @@ int image_decode_gif(struct image *dest,struct image *dest_alpha, **! arg string pnm **! pnm data, as a string **! see also: togif, frompnm -**! known bugs: yes, it does -- it may even do segment overrides... +**! bugs +**! yes, it does -- it may even do segment overrides... */ void image_fromgif(INT32 args) diff --git a/src/modules/Image/x.c b/src/modules/Image/x.c index 7676cf2a807b04187fa410670e4f522d46a186e8..dd23f9a933edb4dda813afc8c571f2a58f5832bb 100644 --- a/src/modules/Image/x.c +++ b/src/modules/Image/x.c @@ -1,4 +1,4 @@ -/* $Id: x.c,v 1.6 1997/04/03 07:00:46 mirar Exp $ */ +/* $Id: x.c,v 1.7 1997/05/05 21:35:10 mirar Exp $ */ /* **! module Image @@ -12,7 +12,7 @@ #include "stralloc.h" #include "global.h" -RCSID("$Id: x.c,v 1.6 1997/04/03 07:00:46 mirar Exp $"); +RCSID("$Id: x.c,v 1.7 1997/05/05 21:35:10 mirar Exp $"); #include "types.h" #include "pike_macros.h" #include "object.h" @@ -35,7 +35,8 @@ struct program *image_program; **! method string cast(string type) **! returns the image data as a string ("rgbrgbrgb...") **! see also: toppm, togif, tozbgr, to8bit, to8bit_rgbcube -**! known bugs: always casts to string... +**! bugs +**! always casts to string... */ void image_cast(INT32 args)