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";   inherit "roxenlib";   constant thread_safe=1;      roxen.ImageCache the_cache; - constant cvs_version="$Id: cimg.pike,v 1.14 2000/04/06 07:34:41 wing Exp $"; + constant cvs_version="$Id: cimg.pike,v 1.15 2000/04/11 04:51:23 per Exp $";   constant tagdesc="Provides the tag <tt>&lt;cimg&gt;</tt> that can be used "   "to convert images between different image formats.";      constant module_type = MODULE_PARSER;   constant module_name = "Image converter";   constant module_doc = tagdesc;      TAGDOCUMENTATION   #ifdef manual   constant tagdoc=(["cimg":"<desc tag>"+tagdesc+"</desc>"]);
Roxen.git/server/modules/graphics/cimg.pike:41:   {    return the_cache->http_file_answer( f, id );   }      mapping get_my_args( mapping args, object id )   {    mapping a=    ([    "src":(args->src?fix_relative( args->src, id ):0),    "quant":args->quant, +  "crop":args->crop,    "format":args->format,    "maxwidth":args->maxwidth,    "maxheight":args->maxheight,    "scale":args->scale,    "dither":args->dither,    "gamma":args->gamma,    "data":args->data,    ]); -  +  +  a["background-color"] = id->misc->defines->bgcolor +  || "#eeeeee"; +     foreach( glob( "*-*", indices(args)), string n )    a[n] = args[n]; -  +     return a;   }      string tag_cimg( string t, mapping args, RequestID id )   {    mapping a = get_my_args( args, id );    args -= a;    args->src = query_internal_location()+the_cache->store( a,id );    if( mapping size = the_cache->metadata( a, id, 1 ) )    {