Example #1
0
 /**
  * Extract usefull informations from the thumb creator.
  *
  * @access	public static
  * @param	string	$path	File path. Can contain directories aliases.
  * @param	array	$options	File parameters.
  *
  * @return	mixed	Array of various informations
  *
  * @since	Cook 2.6.1
  */
 public static function getImageInfos($path, $options = null)
 {
     include_once JPATH_ADMIN_RTIPRINT . DS . 'classes' . DS . 'images.php';
     $filename = self::getFile($path, 'physical', null);
     $mime = RtiprintClassFile::getMime($filename);
     $thumb = new RtiprintClassImage($filename, $mime);
     $attrs = isset($options['attrs']) ? $options['attrs'] : null;
     $w = isset($options['width']) ? (int) $options['width'] : 0;
     $h = isset($options['height']) ? (int) $options['height'] : 0;
     if ($attrs) {
         $thumb->attrs($attrs);
     }
     $thumb->width($w);
     $thumb->height($h);
     $info = $thumb->info();
     return $info;
 }