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

version» Context lines:

Roxen.git/server/modules/graphics/cimg.pike:1:   // This is a ChiliMoon module. Copyright © 1999 - 2001, Roxen IS.   //      #include <module.h>   inherit "module";   constant thread_safe=1;      core.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.61 2004/06/06 11:03:59 _cvs_stephen Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.62 2004/09/12 00:08:46 _cvs_dirix Exp $";   constant module_type = MODULE_TAG;   constant module_name = "Graphics: 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;
Roxen.git/server/modules/graphics/cimg.pike:173:    if( args["jpeg-shrink" ] )    {    opts->scale_denom = (int)args["jpeg-shrink" ];    opts->scale_num = 1;    }       if( args->data )    layers = core.decode_layers( args->data, opts );    else    { + #ifndef SiteBuilder    mixed tmp = core.load_layers( args->src, id, opts ); -  + #else +  mixed tmp; +  // Let SiteBuilder get a chance to decode its argument data +  if (Sitebuilder.sb_start_use_imagecache) { +  Sitebuilder.sb_start_use_imagecache(args, id); +  tmp = roxen.load_layers(args->src, id, opts); +  Sitebuilder.sb_end_use_imagecache(args, id); +  } else +  { +  tmp = roxen.load_layers(args->src, id, opts); +  } + #endif    if (mappingp(tmp)) {    if (tmp->error == Protocols.HTTP.HTTP_UNAUTH)    return tmp;    else    layers = 0;    }    else layers = tmp;    }       if(!layers)