略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Gmagick::setimagetype

2024-11-15

Gmagick::setimagetype

(PECL gmagick >= Unknown)

Gmagick::setimagetypeSets the image type

说明

public Gmagick::setimagetype(int $imgType): Gmagick

Sets the image type.

参数

imgType

One of the Image type constant (Gmagick::IMGTYPE_*).

返回值

The Gmagick object.

错误/异常

错误时抛出 GmagickException

add a noteadd a note

User Contributed Notes 1 note

up
-2
Jrg Wagner
9 years ago
The predefined constant values listed here are wrong. The correct values can be found at:
www.php.net/manual/de/gmagick.constants.php

They are:
Gmagick::IMGTYPE_UNDEFINED (integer)
Gmagick::IMGTYPE_BILEVEL (integer)
Gmagick::IMGTYPE_GRAYSCALE (integer)
Gmagick::IMGTYPE_GRAYSCALEMATTE (integer)
Gmagick::IMGTYPE_PALETTE (integer)
Gmagick::IMGTYPE_PALETTEMATTE (integer)
Gmagick::IMGTYPE_TRUECOLOR (integer)
Gmagick::IMGTYPE_TRUECOLORMATTE (integer)
Gmagick::IMGTYPE_COLORSEPARATION (integer)
Gmagick::IMGTYPE_COLORSEPARATIONMATTE (integer)
Gmagick::IMGTYPE_OPTIMIZE (integer)

The $image_Type parameter can be one of these constants:

imagick::IMGTYPE_UNDEFINED (integer)
imagick::IMGTYPE_BILEVEL (integer)
imagick::IMGTYPE_GRAYSCALE (integer)
imagick::IMGTYPE_GRAYSCALEMATTE (integer)
imagick::IMGTYPE_PALETTE (integer)
imagick::IMGTYPE_PALETTEMATTE (integer)
imagick::IMGTYPE_TRUECOLOR (integer)
imagick::IMGTYPE_TRUECOLORMATTE (integer)
imagick::IMGTYPE_COLORSEPARATION (integer)
imagick::IMGTYPE_COLORSEPARATIONMATTE (integer)
imagick::IMGTYPE_OPTIMIZE (integer)

See section "IMGTYPE constants" at http://www.php.net/manual/en/imagick.constants.php

官方地址:https://www.php.net/manual/en/gmagick.setimagetype.php

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