Home >php教程 >PHP源码 >imagick库下png转jpg

imagick库下png转jpg

PHP中文网
PHP中文网Original
2016-06-01 14:33:011723browse

imagick库下png转jpg

<?php
$white=new Imagick();
$white->newImage($width, $height, "white");
$white->compositeimage($image, Imagick::COMPOSITE_OVER, 0, 0);
$white->setImageFormat(&#39;jpg&#39;);
$white->writeImage(&#39;image.jpg&#39;);

 以上就是imagick库下png转jpg的内容,更多相关内容请关注PHP中文网(www.php.cn)!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn