Lines Matching refs:image

11     /** @var resource libGD image */
12 protected $image;
13 /** @var int width of the current image */
15 /** @var int height of the current image */
25 $this->image = $this->loadImage($imagepath);
33 if (is_resource($this->image)) {
34 imagedestroy($this->image);
89 $transparency = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
93 $image = imagerotate($this->image, 180, $transparency);
96 $image = imagerotate($this->image, -90, $transparency);
99 $image = imagerotate($this->image, 90, $transparency);
102 /** @var resource $image is now defined */
106 imageflip($image, IMG_FLIP_HORIZONTAL);
109 imagedestroy($this->image);
110 $this->image = $image;
114 imagealphablending($this->image, false);
115 imagesavealpha($this->image, true);
155 $saver = 'image' . $extension;
157 throw new Exception('Can not save image format ' . $extension);
161 imagejpeg($this->image, $path, $this->options['quality']);
163 $saver($this->image, $path);
166 imagedestroy($this->image);
170 * Initialize libGD on the given image
181 throw new Exception('Failed to read image information');
186 // what type of image is it?
190 throw new Exception('Can not work with image format ' . $this->extension);
194 $image = @$creator($path);
196 if ($image === false) {
197 throw new Exception('Failed to load image wiht libGD');
200 return $image;
204 * Creates a new blank image to which we can copy
235 $this->keepGifTransparency($this->image, $canvas);
246 * @param resource $image Original image
247 * @param resource $canvas New, empty image
250 protected function keepGifTransparency($image, $canvas)
261 $transcolorindex = @imagecolortransparent($image);
262 $transcolor = @imagecolorsforindex($image, $transcolorindex);
344 * from the original image to be then resized to the wanted dimensions.
413 $this->image,
426 $this->image,
438 // destroy original GD image ressource and replace with new one
439 imagedestroy($this->image);
440 $this->image = $newimg;