Imagick::setOption

(No version information available, might be only in CVS)

Imagick::setOption — Set an option

Описание

bool Imagick::setOption ( string $key , string $value )
Внимание

К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.

Associates one or options with the wand.

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

key

value

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

Returns TRUE on success.

Коментарии

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

<?php
$handler 
= new Imagick();
$handler->setOption('pdf:use-cropbox''true');
$handler->readImage($imageFileName);
$handler->thumbnailImage(200200true);
$handler->setImageFormat('jpeg');
$handler->writeImage($destThumbFileName);
?>

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-12 00:43:37
http://php5.kiev.ua/manual/ru/function.imagick-setoption.html

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