downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Imagick::setColorspace> <Imagick::sepiaToneImage
[edit] Last updated: Fri, 17 May 2013

view this page in

Imagick::setBackgroundColor

(PECL imagick 2.0.0)

Imagick::setBackgroundColorオブジェクトのデフォルト背景色を設定する

説明

bool Imagick::setBackgroundColor ( mixed $background )

オブジェクトのデフォルト背景色を設定します。

パラメータ

background

返り値

成功した場合に TRUE を返します。

変更履歴

バージョン 説明
2.1.0 色を表す文字列をパラメータとして指定できるようになりました。 これまでのバージョンでは ImagickPixel オブジェクトしか指定できませんでした。



add a note add a note User Contributed Notes Imagick::setBackgroundColor - [1 notes]
up
0
eleg
1 year ago
Be cautious and set bgcolor BEFORE importing a SVG with transparency!  :-/

<?php

$im
= new Imagick();
$im->setBackgroundColor(new ImagickPixel('transparent'));

$im->readImage('carte_Alain2.svg');

$im->setImageFormat("png32");

header('Content-type: image/png');
echo
$im;
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites