PHP > 5.4.0
Get the size of an image from a string.
| Parametr | Datový typ | Výchozí hodnota | Poznámka |
|---|---|---|---|
$imagedata |
string |
||
$imageinfo |
array |
null |
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.
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:
Pomohu vám zavést AI do vašeho projektu – od analýzy a návrhu řešení až po nasazení do produkce. Ušetřete čas, zjednodušte procesy a získejte konkurenční výhodu.
Domluvit konzultaciNabízím trénink vývojářů, konzultace, školení a analýzu návrhových vzorů. Osobně v Praze nebo online.
Napište miNejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.