Imagick::setImageDepth

(PECL imagick 2.0.0)

Imagick::setImageDepthSets the image depth

說明

bool Imagick::setImageDepth ( int $depth )

Sets the image depth.

參數

depth

回傳值

成功時回傳 TRUE

錯誤/例外

錯誤時拋出 ImagickException。

add a note add a note

User Contributed Notes 1 note

up
-8
kehrigan at gmail dot com
9 years ago
Depth is a number in terms of bits. Floats seem to be accepted.

From the ImageMagick documentation:
"This the number of bits in a color sample within a pixel. Use this option to specify the depth of raw images whose depth is unknown such as GRAY, RGB, or CMYK, or to change the depth of any image after it has been read."
To Top