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 are the uses of explode() function?
Can php variables have numbers?
What is the use of array_search() in php?
What is polymorphism with example in php?
Tell me what are sql injections, how do you prevent them and what are the best practices?
what are the current or latest versions of LAMP ? Linux, Apache, MySql, PHP
What is the meaning of symbol '$' in jquery?
What is the difference between explode () and split () functions in php?
How will you create a mysql database using php ?
How to generate pdf file in php?
How to delete a file from the system?
What is lamp in php?