Roxen.git / server / modules / graphics / cimg.pike

version» Context lines:

Roxen.git/server/modules/graphics/cimg.pike:1:   // This is a roxen module. Copyright © 1999 - 2000, Roxen IS.   //      #include <module.h>   inherit "module";   constant thread_safe=1;      roxen.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.35 2000/12/30 07:21:14 per Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.36 2001/01/26 02:41:08 per Exp $";   constant module_type = MODULE_TAG;   constant module_name = "Image converter";   constant module_doc = "Provides the tag <tt>&lt;cimg&gt;</tt> that can be used "   "to convert images between different image formats.";         mapping tagdocumentation() {    Stdio.File file=Stdio.File();    if(!file->open(__FILE__,"r")) return 0;    mapping doc=compile_string("#define manual\n"+file->read())->tagdoc;
Roxen.git/server/modules/graphics/cimg.pike:227:   {    inherit RXML.Tag;    constant name = "emit";    constant plugin_name = "cimg";       array get_dataset( mapping args, RequestID id )    {    mapping res = ([ ]);    mapping a = get_my_args( check_args( args ), id );    string data; -  -  res->src = (query_absolute_internal_location(id)+the_cache->store( a,id )); +  catch // This code will fail if the image does not exist. +  { +  res->src=(query_absolute_internal_location(id)+the_cache->store( a,id ));    data = the_cache->data( a, id , 0 );    res["file-size"] = strlen(data);    res["file-size-kb"] = strlen(data)/1024;    res["data"] = data;    res |= the_cache->metadata( a, id, 0 ); // enforce generation    return ({ res }); -  +  }; +  RXML.parse_error( "Illegal arguments or image" ); +  return ({});    }   }      class TagCImg   {    inherit RXML.Tag;    constant name = "cimg";    constant flags = RXML.FLAG_EMPTY_ELEMENT;       class Frame