CakeFest 2024: The Official CakePHP Conference

Imagick::setBackgroundColor

(PECL imagick 2, PECL imagick 3)

Imagick::setBackgroundColorNesnenin öntanımlı artalan rengini tanımlar

Açıklama

public Imagick::setBackgroundColor(mixed $renk): bool

Nesnenin öntanımlı artalan rengini tanımlar.

Bağımsız Değişkenler

renk

Dönen Değerler

Başarı durumunda true döner.

Sürüm Bilgisi

Sürüm: Açıklama
PECL imagick 2.1.0 Artık renk olarak rengi ifade eden bir dizge belirtilebiliyor. Evvelce sadece bir ImagickPixel nesnesi belirtilebiliyordu.

add a note

User Contributed Notes 1 note

up
0
eleg
12 years 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;
?>
To Top