CakeFest 2024: The Official CakePHP Conference

Gmagick::newimage

(PECL gmagick >= Unknown)

Gmagick::newimage新しい画像を作成する

説明

public Gmagick::newimage(
    int $width,
    int $height,
    string $background,
    string $format = ?
): Gmagick

新しい画像を作成し、背景色を設定します。

パラメータ

width

新しい画像の幅。

height

新しい画像の高さ。

background

この画像で使う背景色 (浮動小数点数)。

format

画像フォーマット。

戻り値

Gmagick オブジェクトを返します。

エラー / 例外

エラー時に GmagickException をスローします。

add a note

User Contributed Notes 1 note

up
4
evitceted
4 years ago
To create a png with the transparent background:
newimage(width, height, "transparent", "png")
To Top