getimagesize() Fonksiyonu

Sözdizimi:

1
array <strong>getimagesize</strong>( string $dosyaAdi )

Gif, jpeg, png veya swf türündeki resim dosyalarının boyutlarını getirir. 4 elemanlı bir dizi döndürür.

Örnek:

1
2
3
4
5
list($width, $height, $type, $attr) = getimagesize("img/flag.gif");
print "Genişlik:$width \n";
print "Yükseklik:$height \n";
print "Tip:$type \n";
print "Bilgi:$attr \n";

Çıktı:

Genişlik:105 Yükseklik:121 Tip:1 Bilgi:width=”105″ height=”121″

Yorum Yaz