PHP funkce getimagesizefromstring()
06. 07. 2020PHP > 5.4.0
Get the size of an image from a string.
Parametry
Parametr | Datový typ | Výchozí hodnota | Poznámka |
---|---|---|---|
$imagedata | string | ||
$imageinfo | array | null |
Návratové hodnoty
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.
Další zdroje
https://www.php.net/manual/en/function.getimagesizefromstring.php
Jan Barášek Více o autorovi
Autor článku podniká jako fullstack senior developer v Praze. Spravuje 300 různě velkých webových projektů, fungujících dodnes. Během spolupráce nabral hluboké zkušenosti, které na tomto webu předává dál.
Rád vám pomůžu:
Kontakt Konzultace a služby Nabídka spolupráce