略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Imagick::flipImage

2024-11-12

Imagick::flipImage

(PECL imagick 2, PECL imagick 3)

Imagick::flipImageCreates a vertical mirror image

说明

public Imagick::flipImage(): bool

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();
}

?>

参见

add a noteadd a note

User Contributed Notes 2 notes

up
10
jeff at jeffharris dot us
8 years ago
To avoid the x-axis and y-axis discussion, flipping emulates a mirror at the bottom (or top) of the image.
ʇo ɐʌoıp ʇɥǝ x-ɐxıs ɐup ʎ-ɐxıs pısɔnssıou, ɟןıddıuƃ ǝɯnןɐʇǝs ɐ ɯıɹɹoɹ ɐʇ ʇɥǝ qoʇʇoɯ )oɹ ʇod( oɟ ʇɥǝ ıɯɐƃǝ˙
up
-1
thenickdude
1 year ago
The horizontal equivalent to this function is called transverseImage()

官方地址:https://www.php.net/manual/en/imagick.flipimage.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3