Branch: Tag:

2009-01-08

2009-01-08 22:23:32 by Stephen R. van den Berg <srb@cuci.nl>

Patch from srb: Only override width/height on cimg when neither have
been specified.

Rev: server/modules/graphics/cimg.pike:1.79

7:      roxen.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.78 2008/12/17 07:11:13 tomas Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.79 2009/01/08 22:23:32 mast 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 "
439:    args->src = query_absolute_internal_location( id )    + the_cache->store( a, id ) + filename + ext;    int no_draw = !id->misc->generate_images; -  if( mapping size = the_cache->metadata( a, id, no_draw ) ) +  mapping size; +  if( !args->width && !args->height +  && (size = the_cache->metadata( a, id, no_draw )) )    {    // image in cache (no_draw above prevents generation on-the-fly)    args->width = size->xsize;