quality() public static méthode

public static quality ( string $percent ) : integer
$percent string
Résultat integer
Exemple #1
0
 /**
  * Save image to file
  *
  * @param string $filename
  * @param int    $quality
  * @return bool
  *
  * @throws Exception
  */
 protected function _save($filename, $quality)
 {
     $quality = $quality ?: $this->_quality;
     $quality = Helper::quality($quality);
     $format = strtolower(FS::ext($filename));
     if (!Helper::isSupportedFormat($format)) {
         $format = $this->_mime;
     }
     $filename = FS::clean($filename);
     // Create the image
     $result = $this->_renderImageByFormat($format, $filename, $quality);
     $this->loadFile($filename);
     $this->_quality = $quality;
     return $result;
 }