PHP 8.3.4 Released!

Imagick::getImageSize

(PECL imagick 2, PECL imagick 3)

Imagick::getImageSizeGörüntü uzunluğunu bayt cinsinden döndürür

Uyarı

Imagick 3.4.4 itibariyle bu işlevin kullanımı ÖNERİLMEMEKTEDİR. Bu işleve asla güvenilmemelidir.

Açıklama

public Imagick::getImageSize(): int
Uyarı

Bu işlev hala belgelendirilmemiştir; sadece bağımsız değişken listesi mevcuttur.

Görüntü uzunluğunu bayt cinsinden döndürür

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

Görüntü bayt sayısını bir tamsayı olarak döndürür. Yöntemin kullanımı önerilmiyor, yerine Imagick::getImageLength() kullanın.

add a note

User Contributed Notes 5 notes

up
20
Ricardo Cordts Monteiro
14 years ago
Practical use to get the dimensions of the image:

<?php
$image
= new Imagick($image_src);
$d = $image->getImageGeometry();
$w = $d['width'];
$h = $d['height'];
?>
up
1
benford at bluhelix dot com
14 years ago
Try Imagick::getSize, Imagick::getImageWidth, or Imagick::getImageHeight if you are looking to get dimensions in pixels (rows, columns) of the current image.
up
0
murphy(at)murphyslantech(dot)de
13 years ago
If you get an error or warning (when using strict settings for PHP), telling you, that this function should not be used anymore try getImageLength() instead ...
up
0
nikolaus
14 years ago
If you're planning to stream imagick images via http, pay attention that this function may return the uncompressed image size, so it's not directly suitable for setting the content-length http header.
up
0
perching_eagle at yahoo dot com
16 years ago
/* get the size of the image in bytes */
$image=new Imagick("c:/htdocs/rose.jpg");
$size=$image->getImageSize();
print "the size of the picture is ".$size." bytes";

result

the size of the picture is 3461 bytes
To Top