Example #1
0
 /**
  * @param string $filePath
  * @param string $cmdPath
  */
 public function __construct($srcPath, $targetPath, $cmdPath = 'convert', $forceJpeg = false)
 {
     $this->cmdPath = $cmdPath;
     list($this->srcWidth, $this->srcHeight, $type, $attr) = getimagesize($srcPath);
     // forceJpeg var is not used.
     // there is no return of the new target file (as string) after the extension change
     //		if ($type == IMAGETYPE_BMP) // convert bmp to jpeg
     //			$type = IMAGETYPE_JPEG;
     //
     //		$ext = '';
     //		if ($this->forceJpeg)
     //			$ext = 'jpg';
     //		elseif(isset(self::$imageExtByType[$type]))
     //			$ext = self::$imageExtByType[$type];
     //
     //		$targetPath = kFile::replaceExt($targetPath, $ext);
     parent::__construct($srcPath, $targetPath);
 }
Example #2
0
 /**
  * @param string $filePath
  * @param string $cmdPath
  */
 public function __construct($srcPath, $targetPath, $cmdPath = null, $forceJpeg = false)
 {
     $this->cmdPath = $cmdPath;
     list($this->srcWidth, $this->srcHeight, $type, $attr) = getimagesize($srcPath);
     parent::__construct($srcPath, $targetPath);
 }