/** * */ public function renderCustomImage() { $imagick = new \Imagick(); $imagick->setcolorspace(\Imagick::COLORSPACE_GRAY); $imagick->newPseudoImage(10, 256, 'gradient:black-white'); $imagick->evaluateimage(\Imagick::EVALUATE_POW, 0.5); Image::analyzeImage($imagick); }
/** * */ public function renderCustomImage123() { $imagick = new \Imagick(); $imagick->newPseudoImage(10, 256, 'gradient:black-white'); $imagick->evaluateimage(\Imagick::EVALUATE_SINE, 0.5); $imagick->normalizeImage(); $imagick->evaluateimage(\Imagick::EVALUATE_COSINE, 8); Image::analyzeImage($imagick); }
public function renderImageArcsin() { //Example Imagick::functionImage ArcSin $imagick = new \Imagick(); $imagick->newPseudoImage(500, 500, 'gradient:black-white'); $arguments = array($this->control->getFirstTerm()); $secondTerm = $this->control->getSecondTerm(); $thirdTerm = $this->control->getThirdTerm(); $fourthTerm = $this->control->getFourthTerm(); if (strlen($secondTerm)) { $arguments[] = $secondTerm; if (strlen($thirdTerm)) { $arguments[] = $thirdTerm; if (strlen($fourthTerm)) { $arguments[] = $fourthTerm; } } } $imagick->functionImage(\Imagick::FUNCTION_ARCSIN, $arguments); $imagick->setimageformat('png'); Image::analyzeImage($imagick, 512, 256); //Example end }