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.33 2000/12/05 00:39:53 nilsson Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.34 2000/12/10 04:30:23 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:131:    array layers;    mapping opts = ([]);    if( args["process-all-layers"] )    opts->draw_all_layers = 1;       if( args->data )    layers = roxen.decode_layers( args->data, opts );    else    layers = roxen.load_layers( args->src, id, opts );    +  layers->set_misc_value( "visible",1 ); +  foreach( layers, Image.Layer lay ) +  if( !lay->get_misc_value( "name" ) ) +  lay->set_misc_value( "name", "Background" );       if( args["exclude-layers"] )    {    foreach( args["exclude-layers"] / ",", string match )    foreach( layers, Image.Layer lay )    if( glob( match, lay->get_misc_value( "name" ) ) )    lay->set_misc_value( "visible", 0 );    }       if( args["include-layers"] )
Roxen.git/server/modules/graphics/cimg.pike:247:    constant flags = RXML.FLAG_EMPTY_ELEMENT;       class Frame    {    inherit RXML.Frame;       array do_return(RequestID id)    {    mapping a = get_my_args( check_args( args ), id );    args -= a; -  args->src = query_absolute_internal_location(id)+the_cache->store( a,id ); +  args->src=query_absolute_internal_location(id)+the_cache->store( a,id );    if( mapping size = the_cache->metadata( a, id, 1 ) )    {    // image in cache (1 above prevents generation on-the-fly)    args->width = size->xsize;    args->height = size->ysize;    }    int xml=!args->noxml;    m_delete(args, "noxml");    result = Roxen.make_tag( "img", args, xml );    return 0;