wppaste
WordPress

WP_Image_Editor_Imagick

Since
3.5.0
Source
wp-includes/class-wp-image-editor-imagick.php:16
WordPress Image Editor Class for Image Manipulation through Imagick PHP Module

Compatibility

WordPress
since 3.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 4

Every hook that fires from inside WP_Image_Editor_Imagick, in the order it appears in the class, grouped by the method that fires it.

Properties · 3

$imageImagickprotected
Imagick object.
$stream_file_datastring|nullprivate
Temporarily stores stream image data while processing internally.
$image_given_namestring|nullprivate
Temporarily stores the parsed given name for an image while processing internally.

Methods · 23

Source code

class WP_Image_Editor_Imagick extends WP_Image_Editor {	/**	 * Imagick object.	 *	 * @var Imagick	 */	protected $image; 	/**	 * Temporarily stores stream image data while processing internally.	 *	 * @see self::pdf_load_source()	 *	 * @since 7.0.4	 *	 * @var string|null	 */	private $stream_file_data = null; 	/**	 * Temporarily stores the parsed given name for an image while processing internally.	 *	 * @see self::pdf_load_source()	 *	 * @since 7.0.4	 *	 * @var string|null	 */	private $image_given_name = null; 	public function __destruct() {		if ( $this->image instanceof Imagick ) {			// We don't need the original in memory anymore.			$this->image->clear();			$this->image->destroy();		}	} 	/**	 * Checks to see if current environment supports Imagick.	 *	 * We require Imagick 2.2.0 or greater, based on whether the queryFormats()	 * method can be called statically.	 *	 * @since 3.5.0	 *	 * @param array $args	 * @return bool	 */	public static function test( $args = array() ) { 		// First, test Imagick's extension and classes.		if ( ! extension_loaded( 'imagick' ) || ! class_exists( 'Imagick', false ) || ! class_exists( 'ImagickPixel', false ) ) {			return false;		} 		if ( version_compare( phpversion( 'imagick' ), '2.2.0', '<' ) ) {			return false;		} 		$required_methods = array(			'clear',			'destroy',			'valid',			'getimage',			'writeimage',			'getimageblob',			'getimagegeometry',			'getimageformat',			'setimageformat',			'setimagecompression',			'setimagecompressionquality',			'setimagepage',			'setoption',			'scaleimage',			'cropimage',			'rotateimage',			'flipimage',			'flopimage',			'readimage',

Changelog

Introduced in 3.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/class-wp-image-editor-imagick.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.