GetImageSize () will determine the size of any GIF, JPG, PNG, or SWF document, and returns the width and height of the document and the type of file, with a high and wide string using an internal standard HTML IMG tag.
The returned array has four elements, the index value of 0 indicates the width of the graph to how many pixels (pixels), the index value 1 indicates the height of the graph, the index value 2 indicates the type of the graph, 1=gif,2=jpg,3=png, the index value 3 is a "height=xxx width=xxx" string , it can be used directly in the IMG tag.
Example:
<?php
<?php $size = getimagesize ("img/flag.jpg");?>
<img src= "img/flag.jpg" <?php echo $size [3];?>
?>
Non-required parameters Imageinfo allows you to take some extended information out of the map, which will now return different JPG app IDs (markers) in a combined array, some programs use these app logos to embed text information into graphics, a fairly common implant IPTC http://www.xe.net/iptc/information is in the APP13 identification. You can use the Iptcparse () function to parse the binary APP13 identity and become readable.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.