diff --git a/src/modules/Image/encodings/any.c b/src/modules/Image/encodings/any.c index 61b0a4ede6b45f36f10f48623e39fd867573990a..6add3ea124fc6a4edc4231cd0cd5a1cddfccb56e 100644 --- a/src/modules/Image/encodings/any.c +++ b/src/modules/Image/encodings/any.c @@ -1,9 +1,9 @@ -/* $Id: any.c,v 1.5 1999/04/06 17:24:30 marcus Exp $ */ +/* $Id: any.c,v 1.6 1999/04/09 10:19:51 mirar Exp $ */ /* **! module Image **! note -**! $Id: any.c,v 1.5 1999/04/06 17:24:30 marcus Exp $ +**! $Id: any.c,v 1.6 1999/04/09 10:19:51 mirar Exp $ **! submodule ANY **! **! This method calls the other decoding methods @@ -11,7 +11,7 @@ **! this is. **! **! Methods: -**! <ref>decode</ref>, <ref>decode_trans</ref>, +**! <ref>decode</ref>, <ref>decode_alpha</ref>, **! <ref>_decode</ref> **! **! see also: Image @@ -23,7 +23,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: any.c,v 1.5 1999/04/06 17:24:30 marcus Exp $"); +RCSID("$Id: any.c,v 1.6 1999/04/09 10:19:51 mirar Exp $"); #include "pike_macros.h" #include "operators.h" #include "builtin_functions.h" @@ -40,6 +40,24 @@ void image_gif__decode(INT32 args); void image_pnm_decode(INT32 args); void image_xwd__decode(INT32 args); +/* +**! method mapping _decode(string data) +** method object decode(string data) +** method object decode_alpha(string data) +**! Tries heuristics to find the correct method +**! of decoding the data, then calls that method. +**! +**! The result of _decode() is a mapping that contains +**! <pre> +**! "type":image data type (ie, "image/jpeg" or similar) +**! "image":the image object, +**! "alpha":the alpha channel or 0 if N/A +**! </pre> +**! +**! note +**! Throws upon failure. +*/ + void image_any__decode(INT32 args) { if (args!=1 || sp[-args].type!=T_STRING) @@ -112,7 +130,10 @@ void image_any__decode(INT32 args) return; /* done */ } + goto unknown_format; + default: +unknown_format: error("Unknown image format.\n"); } diff --git a/src/modules/Image/pattern.c b/src/modules/Image/pattern.c index a7e26dd1234b91ef8e522dc326b4d09fc4445b2f..ab7917b4becdc7d702fc9b39bf92b2f46e70223e 100644 --- a/src/modules/Image/pattern.c +++ b/src/modules/Image/pattern.c @@ -1,9 +1,9 @@ -/* $Id: pattern.c,v 1.12 1999/03/03 04:49:36 mirar Exp $ */ +/* $Id: pattern.c,v 1.13 1999/04/09 10:20:38 mirar Exp $ */ /* **! module Image **! note -**! $Id: pattern.c,v 1.12 1999/03/03 04:49:36 mirar Exp $ +**! $Id: pattern.c,v 1.13 1999/04/09 10:20:38 mirar Exp $ **! class image */ @@ -368,7 +368,7 @@ void image_turbulence(INT32 args) **! <td>color(red)<br>(same again)</td> **! <td>...red channel<br></td> **! </tr></table> -**! </tr><tr> +**! </tr></tr> **! **! Use with ->grey() or ->color() for one-color-results. **! diff --git a/src/modules/_Image_TTF/image_ttf.c b/src/modules/_Image_TTF/image_ttf.c index 0dccd3b91ec0f083627e3e1ff1c3f600ebd14110..9173850e6f711675c209012f8d0aaa5033a53055 100644 --- a/src/modules/_Image_TTF/image_ttf.c +++ b/src/modules/_Image_TTF/image_ttf.c @@ -1,12 +1,12 @@ /* - * $Id: image_ttf.c,v 1.12 1999/03/23 20:28:49 per Exp $ + * $Id: image_ttf.c,v 1.13 1999/04/09 10:18:28 mirar Exp $ */ #include "config.h" #include "global.h" -RCSID("$Id: image_ttf.c,v 1.12 1999/03/23 20:28:49 per Exp $"); +RCSID("$Id: image_ttf.c,v 1.13 1999/04/09 10:18:28 mirar Exp $"); #ifdef HAVE_LIBTTF #include <freetype.h> @@ -620,7 +620,7 @@ static void image_ttf_face_make(INT32 args) **! This is the instance of a face, with geometrics, **! encodings and stuff. **! -**! method create(object face) +**! method void create(object face) **! creates a new Instance from a face. */