Lines Matching full:image

7  * Image processing adapter for PHP's libGD
11 /** @var resource libGD image */
12 protected $image; variable in splitbrain\\slika\\GdAdapter
13 /** @var int width of the current image */
15 /** @var int height of the current image */
25 $this->image = $this->loadImage($imagepath);
33 // destroy the GD image resource (only needed on PHP < 8.0)
34 if (is_resource($this->image)) {
35 imagedestroy($this->image);
90 $transparency = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
94 $image = imagerotate($this->image, 180, $transparency);
97 $image = imagerotate($this->image, -90, $transparency);
100 $image = imagerotate($this->image, 90, $transparency);
103 /** @var resource $image is now defined */
107 imageflip($image, IMG_FLIP_HORIZONTAL);
110 $this->__destruct(); // destroy old image
111 $this->image = $image;
115 imagealphablending($this->image, false);
116 imagesavealpha($this->image, true);
156 $saver = 'image' . $extension;
158 throw new Exception('Can not save image format ' . $extension);
162 imagejpeg($this->image, $path, $this->options['quality']);
164 $saver($this->image, $path);
171 * Initialize libGD on the given image
182 throw new Exception('Failed to read image information');
187 // what type of image is it?
191 throw new Exception('Can not work with image format ' . $this->extension);
195 $image = @$creator($path);
197 if ($image === false) {
198 throw new Exception('Failed to load image wiht libGD');
201 return $image;
205 * Creates a new blank image to which we can copy
236 $this->keepGifTransparency($this->image, $canvas);
247 * @param resource $image Original image
248 * @param resource $canvas New, empty image
251 protected function keepGifTransparency($image, $canvas) argument
262 $transcolorindex = @imagecolortransparent($image);
263 $transcolor = @imagecolorsforindex($image, $transcolorindex);
345 * from the original image to be then resized to the wanted dimensions.
414 $this->image,
427 $this->image,
439 // destroy original GD image ressource and replace with new one
441 $this->image = $newimg;