Image's width and height
Last Updated on Thursday, 22 January 2009 06:10 Written by Zack Tuesday, 20 January 2009 10:28
PHP မွာ မိုက္တဲ့ function ေနာက္တစ္ခုေတြ႔လို႔ ေရးလိုက္ပါတယ္။ ဒီ function က image ရဲ႔ width,height and type
စတာေတြကို return ျပန္ေပးတာပါ။
Syntax:
list($width, $height, $type, $attr) = getimagesize("image_name.jpg");
Sample:
<?php
list($width, $height, $type, $attr) = getimagesize("image_name.jpg");
echo "Image width " .$width;
echo "<BR>";
echo "Image height " .$height;
echo "<BR>";
echo "Image type " .$type;
echo "<BR>";
echo "Attribute " .$attr;
?>
Output:
Image width 379
Image height 344
Image type 2
Image attribute width="379" height="344"
ဒီ function က image type ကို 1,2,3,... return ျပန္ေပးတာျဖစ္လို႔ အဲဒီ type ေတြကို သိခ်င္တယ္ ဆိုရင္ ေအာက္မွာ
ၾကည့္ႏိုင္ပါတယ္။
|
||||||||||||||||||||||||
တျခား PHP Post ေတြအားလုံး ကို ႏွစ္သက္ရာ ေရြးဖတ္ ခ်င္တယ္ဆိုရင္ ဒီ Link ေလးကို Click လိုက္ပါ။
| < Prev | Next > |
|---|
Login Form
Latest Post
Categories Table View
- Reader's Conner (133)
- PHP (48)
- Joomla CMS (46)
- Codeigniter (18)
- jQuery (12)
- iDhamma (11)
- Mobile Development (10)
- PHP & AJAX (4)
- Apache (3)
- For Mac (3)
- mySQL (2)
- DhammaDroid (1)