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 is regex in html?
What is string and its function?
What are the uses of php language?
What is php oop?
What is a query in php?
What sized websites have you worked on in the past?
How is csrf token generated?
What is variable give example?
What is a persistence cookie?
What are advantages of .htaccess?
find highest salary
What is whitespace in html?