(PECL imagick 2.0.0)

Imagick::setOptionSet an option


bool Imagick::setOption ( string $key , string $value )

Associates one or more options with the wand.

Список параметров



Возвращаемые значения

В случае успешной работы возвращает TRUE.


If you want to extract a preview from a PDF file using the CropBox instead of the whole document, setOption() is the right method:

= new Imagick();

It is the equivalent to the -define pdf:use-cropbox=true for the convert command line tool. pdf:use-trimbox is also available.

Note that on my environment the setOption only worked when i called it before the readImage method, which means that you can't pass the filename to the Imagick constructor directly.
2011-07-11 17:43:37
List of options (with key => value) on official imagemagick site:
2015-09-24 17:48:49
Actually setImageArtifact () can be used if setOption () fails, e.g.

$im->setImageartifact ("distort:viewport", "960x540+0-151");

Or maybe setOption () is deprecated.
2020-03-29 22:17:02

    Поддержать сайт на родительском проекте КГБ