<?php
 class phMagick_info{ function getInfo(phmagick $p, $file=''){ if ($file == '') $file = $p->getSource(); return @getimagesize ($file); } function getWidth(phmagick $p, $file=''){ list($width, $height, $type, $attr) = $this->getInfo($p, $file); return $width; } function getHeight(phmagick $p, $file=''){ list($width, $height, $type, $attr) = $this->getInfo($p, $file); return $height; } function getBits(phmagick $p, $file=''){ if ($file == '') $file = $p->getSource(); $info = @getimagesize ($file); return $info["bits"]; } function getMime(phmagick $p, $file=''){ if ($file == '') $file = $p->getSource(); $info = @getimagesize ($file); return $info["mime"]; } } ?>