Ejemplo n.º 1
0
 function testImageSize()
 {
     $file = 'image.png';
     $dim = array('width' => 64, 'height' => 64, 'type' => 2);
     $ok = Raxan::imageResample($file, 64, 64);
     $size = Raxan::imageSize($file);
     $this->compare($size, $dim, 'Image file resized to 64x64');
 }
Ejemplo n.º 2
0
 /**
  * Returns an array containing the width, height and type for the uploaded image file
  * @param string $fld Form element field name
  * @return mixed Array or null on error
  */
 public function fileImageSize($fld)
 {
     $fl = isset($_FILES[$fld]) ? $_FILES[$fld] : null;
     $fl = $fl ? $fl['tmp_name'] : null;
     return Raxan::imageSize($fl);
 }