Development

Changeset 13380

You must first sign up to be able to contribute.

Changeset 13380

Show
Ignore:
Timestamp:
11/26/08 23:26:04 (4 years ago)
Author:
gnat
Message:

fix colorize and border parameter handling

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/gsImageProcessorPlugin/trunk/lib/ImageProcessorHelper.class.php

    r13174 r13380  
    200200         */ 
    201201        if( isset($params['rotate']) ) 
    202             gsRotationProcessor::rotate($img, $params); 
     202           $img = gsRotationProcessor::rotate($img, $params['rotate']); 
    203203 
    204204        /* 
  • plugins/gsImageProcessorPlugin/trunk/lib/gsColorizeProcessor.class.php

    r13174 r13380  
    1919class gsColorizeProcessor 
    2020{ 
    21     static public function colourize(&$input_img,$params = array()) //$color = null,$ret_new=false) 
     21    static public function colorize(&$input_img,$params = array()) //$color = null,$ret_new=false) 
    2222    { 
    2323        $img = (isset($params['clone'])) ? new gdImage($input_img->getData()): $input_img; 
     
    3131            throw new sfException('Wrong parameter count for colourization!'); 
    3232 
    33         imagefilter($tmp->getData(), IMG_FILTER_GRAYSCALE); 
    34         imagefilter($tmp->getData(), IMG_FILTER_COLORIZE, $color[0], $color[1], $color[2]); 
     33        imagefilter($img->getData(), IMG_FILTER_GRAYSCALE); 
     34        imagefilter($img->getData(), IMG_FILTER_COLORIZE, $color[0], $color[1], $color[2]); 
    3535 
    3636        return $img; 
  • plugins/gsImageProcessorPlugin/trunk/lib/gsRotationProcessor.class.php

    r13174 r13380  
    2929            $background = @imagecolorallocate($img->getData(),$background[0],$background[1],$background[2]); 
    3030        } 
     31        else 
     32            $background = @imagecolorallocate($img->getData(),255,255,255); 
    3133 
    32         imagerotate($img->getData(), $params['degree'],$background,isset($params['ignore_transparent'])?$params['ignore_transparent']:null); 
     34        $img->setData(imagerotate($img->getData(), $params['degree'], $background, isset($params['ignore_transparent'])?$params['ignore_transparent']:null)); 
    3335 
    3436        return $img;