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 - 2004, Roxen IS.   //      #include <module.h>   inherit "module";   constant thread_safe=1;      roxen.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.68 2004/09/21 15:35:27 mast Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.69 2004/10/27 15:02:44 jonasw 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:79: Inside #if defined(manual)
   Insert images from other sources, e.g. databases through entities or    variables.</p>   <ex-box><emit source='sql' query='select imagedata from images where id=37'>    <cimg-url data='&sql.imagedata;'/>   </emit></ex-box>   </attr>",      "emit#cimg":({ #"<desc type='plugin'><p><short>    Entitybased version of <xref href='../graphics/cimg.tag' />.</short>    Takes the same attributes as <tag>cimg</tag>.</p> - </desc>", + </desc>    -  + <attr name='nodata' value='yes | no'><p> +  Controls suppression of <ent>_.data</ent> in the output. Useful for +  reducing memory consumption in cached emit tags. The default value +  is 'no'.</p>", +    ([   "&_.type;":#"<desc type='entity'><p>    Returns the image's content-type.</p>   </desc>",      "&_.src;":#"<desc type='entity'><p>    Returns the path to the indata file.</p>   </desc>",      "&_.file-size;":#"<desc type='entity'><p>
Roxen.git/server/modules/graphics/cimg.pike:349: Inside #if defined(DEBUG_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; +  if (lower_case(args->nodata || "no") == "no")    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