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.62 2003/10/17 11:39:44 anders Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.63 2004/05/05 09:41:20 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:182: Inside #if constant(Sitebuilder)
   Sitebuilder.sb_start_use_imagecache(args, id);    tmp = roxen.load_layers(args->src, id, opts);    Sitebuilder.sb_end_use_imagecache(args, id);    } else   #endif    {    tmp = roxen.load_layers(args->src, id, opts);    }       if (mappingp(tmp)) { -  if (tmp->error == 401) +  if (tmp->error == Protocols.HTTP.HTTP_UNAUTH)    return tmp;    else    layers = 0;    }    else layers = tmp;    }       if(!layers)    {    if( args->data )    error("Failed to decode specified data\n");    else    error("Failed to load specified image [%O]\n", args->src);    }    -  if (!sizeof(layers->image() - ({0}))) +  if (!sizeof(filter(layers->image(), objectp)))    error("Failed to decode layers in specified image [%O]\n", args->src);       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 )