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
 /**
  * Resamples (convert/resize) the uploaded image. You can specify a new width, height and type
  * @param string $fld Form element field name
  * @see Raxan::imageResample()
  * @return boolean
  */
 public function fileImageResample($fld, $w, $h, $type = null)
 {
     $fl = isset($_FILES[$fld]) ? $_FILES[$fld] : null;
     $fl = $fl ? $fl['tmp_name'] : null;
     return Raxan::imageResample($fl, $w, $h, $type);
 }