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
When to use single quotes, double quotes, and backticks?
How is traits used in php?
What is meant by urlencode and urldecode?
What is the difference between apache and tomcat?
What is empty php?
What is isset post?
How many keywords are there in php?
What is api example?
What is php simple definition?
How do I run a php file?
What is variable and data type?
How to fix "headers already sent" error in php
Is php a mvc?
Is array function in php?
What kind of things have you done on the social side?