PHP 8.3.4 Released!

imagesy

(PHP 4, PHP 5, PHP 7, PHP 8)

imagesy画像の高さを取得する

説明

imagesy(GdImage $image): int

指定した画像オブジェクト image の高さを返します。

パラメータ

image

imagecreatetruecolor()のような画像作成関数が返す GdImage オブジェクト。

戻り値

image の高さを返します。

変更履歴

バージョン 説明
8.0.0 image は、 GdImage クラスのインスタンスを期待するようになりました。 これより前のバージョンでは、有効な gd resource が期待されていました。

例1 imagesy() の使用法

<?php

// 300*200 の画像を作成します
$img = imagecreatetruecolor(300, 200);

echo
imagesy($img); // 200

?>

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top