1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-08-01 22:00:31 +02:00

Made &lossless part of the generated cache filename.

This commit is contained in:
Mikael Roos
2016-08-09 13:22:33 +02:00
parent c5de59a754
commit 2337dbe94c
5 changed files with 13 additions and 6 deletions

View File

@@ -1398,6 +1398,7 @@ class CImage
$compress = $this->compress ? "_co{$this->compress}" : null; $compress = $this->compress ? "_co{$this->compress}" : null;
$rotateBefore = $this->rotateBefore ? "_rb{$this->rotateBefore}" : null; $rotateBefore = $this->rotateBefore ? "_rb{$this->rotateBefore}" : null;
$rotateAfter = $this->rotateAfter ? "_ra{$this->rotateAfter}" : null; $rotateAfter = $this->rotateAfter ? "_ra{$this->rotateAfter}" : null;
$lossy = $this->lossy ? "_l" : null;
$saveAs = $this->normalizeFileExtension(); $saveAs = $this->normalizeFileExtension();
$saveAs = $saveAs ? "_$saveAs" : null; $saveAs = $saveAs ? "_$saveAs" : null;
@@ -1464,7 +1465,7 @@ class CImage
. $quality . $filters . $sharpen . $emboss . $blur . $palette . $quality . $filters . $sharpen . $emboss . $blur . $palette
. $optimize . $compress . $optimize . $compress
. $scale . $rotateBefore . $rotateAfter . $autoRotate . $bgColor . $scale . $rotateBefore . $rotateAfter . $autoRotate . $bgColor
. $convolve . $copyStrat . $saveAs; . $convolve . $copyStrat . $lossy . $saveAs;
return $this->setTarget($file, $base); return $this->setTarget($file, $base);
} }

View File

@@ -49,14 +49,14 @@ There are several ways of installing. You either install the whole project which
The [sourcode is available on GitHub](https://github.com/mosbth/cimage). Clone, fork or [download as zip](https://github.com/mosbth/cimage/archive/master.zip). The [sourcode is available on GitHub](https://github.com/mosbth/cimage). Clone, fork or [download as zip](https://github.com/mosbth/cimage/archive/master.zip).
**Latest stable version is v0.7.16 released 2016-08-09.** **Latest stable version is v0.7.17 released 2016-08-09.**
I prefer cloning like this. Do switch to the latest stable version. I prefer cloning like this. Do switch to the latest stable version.
```bash ```bash
git clone git://github.com/mosbth/cimage.git git clone git://github.com/mosbth/cimage.git
cd cimage cd cimage
git checkout v0.7.16 git checkout v0.7.17
``` ```
Make the cache-directory writable by the webserver. Make the cache-directory writable by the webserver.
@@ -79,7 +79,7 @@ There are some all-included bundles of `img.php` that can be downloaded and used
Dowload the version of your choice like this. Dowload the version of your choice like this.
```bash ```bash
wget https://raw.githubusercontent.com/mosbth/cimage/v0.7.16/webroot/imgp.php wget https://raw.githubusercontent.com/mosbth/cimage/v0.7.17/webroot/imgp.php
``` ```
Open up the file in your editor and edit the array `$config`. Ensure that the paths to the image directory and the cache directory matches your environment, or create an own config-file for the script. Open up the file in your editor and edit the array `$config`. Ensure that the paths to the image directory and the cache directory matches your environment, or create an own config-file for the script.

View File

@@ -5,6 +5,12 @@ Revision history
[![Build Status](https://scrutinizer-ci.com/g/mosbth/cimage/badges/build.png?b=master)](https://scrutinizer-ci.com/g/mosbth/cimage/build-status/master) [![Build Status](https://scrutinizer-ci.com/g/mosbth/cimage/badges/build.png?b=master)](https://scrutinizer-ci.com/g/mosbth/cimage/build-status/master)
v0.7.17 (2016-08-09)
-------------------------------------
* Made `&lossless` part of the generated cache filename.
v0.7.16 (2016-08-09) v0.7.16 (2016-08-09)
------------------------------------- -------------------------------------

View File

@@ -1,6 +1,6 @@
<?php <?php
// Version of cimage and img.php // Version of cimage and img.php
define("CIMAGE_VERSION", "v0.7.16 (2016-08-09)"); define("CIMAGE_VERSION", "v0.7.17 (2016-08-09)");
// For CRemoteImage // For CRemoteImage
define("CIMAGE_USER_AGENT", "CImage/" . CIMAGE_VERSION); define("CIMAGE_USER_AGENT", "CImage/" . CIMAGE_VERSION);

View File

@@ -342,7 +342,7 @@ return array(
*/ */
/* /*
'postprocessing' => array( 'postprocessing' => array(
'png_lossy' => false, 'png_lossy' => null,
'png_lossy_cmd' => '/usr/local/bin/pngquant --force --output', 'png_lossy_cmd' => '/usr/local/bin/pngquant --force --output',
'png_filter' => false, 'png_filter' => false,