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 - 2001, Roxen IS.   //      #include <module.h>   inherit "module";   constant thread_safe=1;      roxen.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.64 2004/05/21 09:46:19 jonasw Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.65 2004/06/16 09:23:22 anders 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:326:    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;    mixed err = catch // This code will fail if the image does not exist.    { +  // Store misc->cacheable since the image cache can raise it and +  // disable protocol cache. +  int cacheable = id->misc->cacheable; +  int no_proto_cache = id->misc->no_proto_cache; + #ifdef DEBUG_CACHEABLE +  report_debug("%s:%d saved cacheable flags\n", __FILE__, __LINE__); + #endif    res->src=(query_absolute_internal_location(id)+the_cache->store( a,id ));    if(do_ext)    res->src += "." + (a->format || "gif");    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 -  + #ifdef DEBUG_CACHEABLE +  report_debug("%s:%d restored cacheable flags\n", __FILE__, __LINE__); + #endif +  id->misc->cacheable = cacheable; +  id->misc->no_proto_cache = no_proto_cache;    return ({ res });    };   #ifdef DEBUG    report_error("<emit#cimg> error in get_dataset(): %s\n",    describe_backtrace(err));   #endif    RXML.parse_error( "Illegal arguments or image\n" );    return ({});    }   }