1
0
mirror of https://github.com/mosbth/cimage.git synced 2025-08-04 07:07:32 +02:00

Add png compression to generated cache filename, fix #103.

This commit is contained in:
Mikael Roos
2015-09-16 09:51:04 +02:00
parent ea4794f4a2
commit fd2ddadc44
2 changed files with 31 additions and 2 deletions

View File

@@ -417,6 +417,27 @@ class CImage
/**
* Create and save a dummy image.
*
* @param boolean $allow true or false to enable and disable.
* @param string $pattern to use to detect if its a remote file.
*
* @return $this
*/
public function createDummyImage($width = 100, $height = 100)
{
$img = $this->CreateImageKeepTransparency($width, $height);
$this->generateFilename($cachePath);
$this->save();
return $this;
}
/**
* Allow or disallow remote image download.
*
@@ -1244,8 +1265,10 @@ class CImage
$file = $subdir . '_' . $parts['filename'] . '_' . $width . '_'
. $height . $offset . $crop . $cropToFit . $fillToFit
. $crop_x . $crop_y . $upscale
. $quality . $filters . $sharpen . $emboss . $blur . $palette . $optimize
. $scale . $rotateBefore . $rotateAfter . $autoRotate . $bgColor . $convolve
. $quality . $filters . $sharpen . $emboss . $blur . $palette
. $optimize . $compress
. $scale . $rotateBefore . $rotateAfter . $autoRotate . $bgColor
. $convolve
. $extension;
return $this->setTarget($file, $base);

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)
v0.7.5x (latest)
-------------------------------------
* Add option for png compression to generade filename, fix #103.
v0.7.4 (2015-09-15)
-------------------------------------