How can I find the width and height of an image resource?
Answers were Sorted based on User's Feedback
Answer / jude jeevanraj.p
It is often useful to know the width and height of an image
resource. This can be achieved with the functions imagesx
and imagesy, like this:
<?php
$img = imagecreatetruecolor(400, 100);
echo imagesx($img); // 400
echo imagesy($img); // 100
?>
| Is This Answer Correct ? | 3 Yes | 2 No |
What good is polymorphism?
How is it possible to remove escape characters from a string?
Explain about objects in PHP?
What is 'float' property in css?
What are php libraries?
What is ltrim?
Explain me what is x+ mode in fopen() used for?
How to upload a file (may be a .txt or a .doc file) from a php script/file?
How to find the position of the first occurrence of a substring in a string?
How will you create a bi-lingual site (multiple languages) ?
Will a comparison of an integer 12 and a string "13" work in php?
How to make database connection in php?