PHP | Imagick setImageFormat() Function Last Updated : 25 Feb, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report The Imagick::setImageFormat() function is an inbuilt function in PHP which is used to set the format of a particular image in a sequence.Syntax: bool Imagick::setImageFormat( string $format ) Parameters: This function accepts a single parameter $format which holds a string value of the image format like png, svg, etc. Format support is totally depends on the installation of the imagick.Return Value: This function returns TRUE on success.Below programs illustrate the Imagick::setImageFormat() function in PHP:Program 1: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Set the Format $imagick->setImageFormat('png'); // Get the Filename $format = $imagick->getImageFormat(); echo $format; ?> Output: png Program 2: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Set the Format $imagick->setImageFormat('jpeg'); // Get the Format $format = $imagick->getImageFormat(); echo $format; ?> Output: jpeg Reference: https://www.php.net/manual/en/imagick.setimageformat.php Comment More infoAdvertise with us Next Article PHP | Imagick setImageGamma() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Gmagick setimageformat() Function The Gmagick::setimageformat() function is an inbuilt function in PHP which is used to set the image format. Syntax: Gmagick Gmagick::setimageformat( string $imageFormat ) Parameters: This function accepts a single parameter $imageFormat which holds the image format. Return Value: This function retur 1 min read PHP | Imagick setImageMatte() Function The Imagick::setImageMatte() function is an inbuilt function in PHP which is used to set the matte channel of an Imagick object. Syntax: bool Imagick::setImageMatte( $matte ) Parameters: This function accepts single parameter $matte. If the parameter set to True then it activate the matte channel an 2 min read PHP | Imagick setFormat() Function The Imagick::setFormat() function is an inbuilt function in PHP which is used to set the format of the Imagick object. Syntax: bool Imagick::setFormat( string $format ) Parameters: This function accepts a single parameter $format which holds an string value. Return Value: This function returns TRUE 1 min read PHP | Imagick setImageOpacity() Function The Imagick::setImageOpacity() function is an inbuilt function in PHP which is used to set the opacity level of an Imagick object. This method is available in ImageMagick 6.3.1 or newer versions. Syntax: bool Imagick::setImageOpacity( $opct ) Parameters: This function accepts single parameter $opct 1 min read PHP | Imagick setImageGamma() Function The Imagick::setImageGamma() function is an inbuilt function in PHP which is used to set the image gamma. Syntax: bool Imagick::setImageGamma( float $gamma ) Parameters: This function accepts a single parameter $gamma which holds the gamma for the image. Return Value: This function returns TRUE on s 1 min read PHP | Imagick setImageProperty() Function The Imagick::setImageProperty() function is an inbuilt function in PHP which is used to set the image property. The main difference between image properties and image artifacts is that the properties are public whereas artifacts are private. Syntax: bool Imagick::setImageProperty( string $name, stri 1 min read Like