1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-08-08 17:16:34 +02:00

prepare to tag v0.5

This commit is contained in:
Mikael Roos
2014-02-12 15:09:29 +01:00
parent 20a621bf48
commit 0ab7cf7e1b
2 changed files with 8 additions and 7 deletions

View File

@@ -1249,13 +1249,13 @@ class CImage
imagejpeg($this->image, $this->cacheFileName, $this->quality);
// Use JPEG optimize if defined
if ($this->jpegOptimize) {
if ($this->jpegOptimizeCmd) {
if ($this->verbose) {
clearstatcache();
$this->log("Filesize before optimize: " . filesize($this->cacheFileName) . " bytes.");
}
$res = array();
$cmd = $this->jpegOptimize . " -outfile $this->cacheFileName $this->cacheFileName";
$cmd = $this->jpegOptimizeCmd . " -outfile $this->cacheFileName $this->cacheFileName";
exec($cmd, $res);
$this->log($cmd);
$this->log($res);
@@ -1278,26 +1278,26 @@ class CImage
imagepng($this->image, $this->cacheFileName, $this->compress);
// Use external program to filter PNG, if defined
if ($this->pngFilter) {
if ($this->pngFilterCmd) {
if ($this->verbose) {
clearstatcache();
$this->Log("Filesize before filter optimize: " . filesize($this->cacheFileName) . " bytes.");
}
$res = array();
$cmd = $this->pngFilter . " $this->cacheFileName";
$cmd = $this->pngFilterCmd . " $this->cacheFileName";
exec($cmd, $res);
$this->Log($cmd);
$this->Log($res);
}
// Use external program to deflate PNG, if defined
if ($this->pngDeflate) {
if ($this->pngDeflateCmd) {
if ($this->verbose) {
clearstatcache();
$this->Log("Filesize before deflate optimize: " . filesize($this->cacheFileName) . " bytes.");
}
$res = array();
$cmd = $this->pngDeflate . " $this->cacheFileName";
$cmd = $this->pngDeflateCmd . " $this->cacheFileName";
exec($cmd, $res);
$this->Log($cmd);
$this->Log($res);