PHP Manual

PHP function getimagesizefromstring()

2019-09-11T08:04:03.000Z

Obsah článku

PHP > 5.4.0

Get the size of an image from a string.

Parameters

Parameter Data type Default value Note
$imagedata string
$imageinfo array null

Return values

array

|bool Returns an array with 7 elements.

Index 0 and 1 contains respectively the width and the height of the image.

Index 2 is one of the IMAGETYPE_XXX constants indicating the type of the image.

Index 3 is a text string with the correct height="yyy" width="xxx" string

that can be used directly in an IMG tag.

On failure, FALSE is returned.

Additional resources

Official getimagesizefromstring documentation

Jan Barášek   Více o autorovi

Autor článku pracuje jako seniorní vývojář a software architekt v Praze. Navrhuje a spravuje velké webové aplikace, které znáte a používáte. Od roku 2009 nabral bohaté zkušenosti, které tímto webem předává dál.

Rád vám pomůžu:

Související články

1.
66.

V jiných jazycích

Status:
All systems normal.
2025