Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is html used for?

1021


What do you mean by having php as whitespace insensitive?

979


Is PHP runs on different platforms (Windows, Linux, Unix, etc.)?

1052


Tell me what does the scope of variables means?

945


What is substr in php?

1045


What is the functionality of the functions strstr() and stristr()?

982


How to swap two variables without using 3rd temp variable.

920


How to reset/destroy a cookie in php?

970


Tell me how to execute an sql query? How to fetch its result?

979


How to check an key is exists in array?

1087


What is difference between rest and http?

1012


Do you know what is the use of the function 'imagetypes()'?

997


How to generate a character from an ascii value?

1210


Distinguish between urlencode and urldecode?

995


Explain the value of the variable input is a string 1,2,3,4,5,6,7. How would you get the sum of the integers contained inside input?

979