How can I find the width and height of an image resource?
Answer Posted / 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 |
Post New Answer View All Answers
Why sessions are used in php?
how retrive the video file in php using video tag
Which function Returns the time of sunrise for a given day / location in PHP.
What is the use of the function htmlentities?
Does csrf token change?
What is the use of header() function in php?
How to get the value of current session id?
Is php still used?
What is php variable?
What is var_dump function in php?
What is the function mysql_pconnect() usefull for?
Which is faster for or foreach php?
Do while loops php?
What type of headers that PHP supports?
how can i develop forum code? any one pleale help me on this question