public function modify(Image $image) { $imagick = $image->getImagick(); $width = $imagick->getImageWidth(); $height = $imagick->getImageHeight(); $this->height = $height * $this->percentHeight; $this->width = $width * $this->percentWidth; parent::modify($image); }
public function modify(Image $image) { $imagick = $image->getImagick(); if ($this->vertical) { $imagick->flipImage(); } if ($this->horizontal) { $imagick->flopImage(); } }
public function modify(Image $image) { $imagick = $image->getImagick(); /* Black text */ $this->draw->setFillColor($this->color); /* Font properties */ $this->draw->setFont($this->font); $this->draw->setFillOpacity($this->opacity); $this->draw->setFontSize($this->size); $this->draw->setTextAlignment($this->alignment); /* Create text */ $imagick->annotateImage($this->draw, $this->x, $this->y, 0, $this->text); }
public function modify(Image $image) { $imagick = $image->getImagick(); $width = $imagick->getImageWidth(); $height = $imagick->getImageHeight(); //Figure out filter depending if shrinking or enlarging image $filter = $this->filter; if ($filter == null) { //Default to LANCZOS $filter = self::FILTER_LANCZOS; if ($width < $this->width && $height < $this->height) { //Enlarging image, use Mitchell $filter = self::FILTER_MITCHELL; } } $imagick->resizeImage($this->width, $this->height, $filter, 1); }
public function modify(Image $image) { $imagick = $image->getImagick(); $width = $imagick->getImageWidth(); $height = $imagick->getImageHeight(); $widthRatio = $this->maxWidth / $width; $heightRatio = $this->maxHeight / $height; if ($widthRatio < $heightRatio) { //Scale by width $this->height = $widthRatio * $height; $this->width = $this->maxWidth; parent::modify($image); } else { //Scale by height $this->width = $heightRatio * $width; $this->height = $this->maxHeight; parent::modify($image); } }
public function modify(Image $image) { $imagick = $image->getImagick(); $imagick->setImageOpacity($this->opacity); }
public function modify(Image $image) { $imagick = $image->getImagick(); $imagick->compositeImage($this->image->getImagick(), Imagick::COMPOSITE_DEFAULT, $this->x, $this->y); }
public function modify(Image $image) { $imagick = $image->getImagick(); $imagick->gaussianBlurImage($this->radius, $this->sigma, $this->channel); }
public function modify(Image $image) { $imagick = $image->getImagick(); $imagick->cropImage($this->width, $this->height, $this->x, $this->y); }