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.56 2002/11/06 15:06:07 anders Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.57 2003/07/04 12:07:36 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:136:   string status() {    array s=the_cache->status();    return sprintf("<b>Images in cache:</b> %d images<br />\n"    "<b>Cache size:</b> %s",    s[0], Roxen.sizetostring(s[1]));   }      array(Image.Layer)|mapping generate_image( mapping args, RequestID id )   {    array layers; -  mapping opts = ([]); +  +  // Photoshop layers: don't let individual layers expand the image +  // beyond the bounds of the overall image. +  mapping opts = ([ "crop_to_bounds" : 1 ]); +     if( args["process-all-layers"] )    opts->draw_all_layers = 1;       if( args["jpeg-shrink" ] )    {    opts->scale_denom = (int)args["jpeg-shrink" ];    opts->scale_num = 1;    }       if( args->data )