Changeset 16990 for branches/2.4/include


Ignore:
Timestamp:
Jul 24, 2012, 10:50:20 PM (12 years ago)
Author:
rvelices
Message:

bug 2682: Watermark sizing calculation is made on the requested size not on the final one (merge from trunk)

Location:
branches/2.4/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/include/derivative.inc.php

    r16507 r16990  
    198198    if ( $src->has_size() && $params->is_identity( $src->get_size() ) )
    199199    {
    200       if (!$params->use_watermark && !$src->rotation)
     200      if (!$params->will_watermark($src->get_size()) && !$src->rotation)
    201201      {
    202202        $params = null;
  • branches/2.4/include/derivative_params.inc.php

    r14649 r16990  
    282282    return true;
    283283  }
     284 
     285  function will_watermark($out_size)
     286  {
     287    if ($this->use_watermark)
     288    {
     289      $min_size = ImageStdParams::get_watermark()->min_size;
     290      return $min_size[0]<=$out_size[0]
     291        && $min_size[1]<=$$out_size[1];
     292    }
     293    return false;
     294  }
    284295}
    285296?>
Note: See TracChangeset for help on using the changeset viewer.