array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'imagick.flipimage.php', 1 => 'Imagick::flipImage', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.flattenimages.php', 1 => 'Imagick::flattenImages', ), 'next' => array ( 0 => 'imagick.floodfillpaintimage.php', 1 => 'Imagick::floodFillPaintImage', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/flipimage.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL imagick 2, PECL imagick 3)
Imagick::flipImage — Creates a vertical mirror image
Creates a vertical mirror image by reflecting the pixels around the central x-axis.
此函数没有参数。
成功时返回 true
。
错误时抛出 ImagickException。
示例 #1 Imagick::flipImage()
<?php
function flipImage($imagePath) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->flipImage();
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>