HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

imagesx

Description

The imagesx of Image for PHP get image width.

Syntax

imagesx(
    GdImage $image
): int

Parameters

image

A GdImage object, returned by one of the image creation functions, such as imagecreatetruecolor().

Return

Return the width of the image.

Examples

1 · return

<?

$width = 100;
$height = 50;
$image = imagecreate($width, $height);

$return = imagesx($image);

echo $return;
100