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 |
How to set session.gc_divisor properly?
What is a controller php?
What are the uses of implode() function?
How do I expire a php session after 30 minutes?
How do I sort numbers in php?
How do you call a constructor for a parent class?
Do you know what is the use of rand() in php?
What is cakephp framework?
Extract url from this string? It should be flexible for all strings, not for this string only. "yahoo.comyahoo.co.inhotmail.org"
How can we optimize or increase the speed of a mysql select query?
Tell me what is htaccess?
How to make multilanguage site in php? (like english,tamil)