Change language

PHP Imagick fxImage () function

< script type = "text / javascript"> (function (w, d, n, s, t) {w [n] = w [n] || []; w [n] .push (function() {Ya. Context.AdvManager.render ({blockId: "RA-479357-4", renderTo: "yandex_rtb_R-A-479357-4", async: true});}); t = d.getElementsByTagName ("script") [0 ]; s = d.createElement ("script"); s.type = "text / javascript"; s.src = "//an.yandex.ru/system/context.js"; s.async = true; t .parentNode.insertBefore (s, t);}) (this, this.document, "yandexContextAsyncCallbacks");
  • Imagick::fxImage Function()- it is a built-in function in PHP that evaluates an expression for each pixel in an image.
  • The Imagick::fxImage() function allows you to manipulate images by processing a set of FX expressions for each pixel in an image.
Syntax:
Imagick::fxImage (string $expression [, int $channel = Imagick::CHANNEL_DEFAULT]) 
Options:
  • $expression
    These are FX expressions for manipulating images.
  • $channel
    Any channel constant can be selected based on the actual channel mode. If you need to add more channel constant, use bitwise operators to combine channel type constants.
    Return value:
  • Imagick function: : fxImagereturns TRUE onon success, or
    FALSEon failure.
Example 1:
To illustrate image manipulation by an FX expression using the Imagick::fxImage()function.
// Imagick-fxImage $imagick = new Imagick(); // new pseudo image $imagick -> newPseudoImage (200, 200, " gradient: white-black " ); // $fx value applied $fx = ’floor (s * 10 + 0.5) / 10’ ; $fxImage = $imagick -> fxImage ( $fx ); // Show image header ( "Content-Type: image / png" ); $fxImage -> setimageformat ( ’png’ ); echo $fxImage -> getImageBlob(); ?>
Output: Example 2:
To illustrate image manipulation by an FX expression using the Imagick::fxImage()function.
// Imagick-fxImage $imagick = new Imagick(); // New pseudo-image $imagick -> newPseudoImage (200, 200, "plasma: fractal" ); // $fx value applied $fx = ’(u.g + vg) / 2’ ; $fxImage = $imagick -> fxImage ( $fx ); // Show image header ( " Content-Type: image / png " ); $fxImage -> setimageformat ( ’png’ ); echo $fxImage -> getImageBlob(); $fxImage -> WriteImage ( ’Imagick-fxImageex02.png’ ); ?>
Output: Link : https://www.php.net/manual/en/imagick .fximage.php

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method