mirror of
https://github.com/mosbth/cimage.git
synced 2025-07-30 21:20:11 +02:00
Add png compression to generated cache filename, fix #103.
This commit is contained in:
27
CImage.php
27
CImage.php
@@ -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);
|
||||
|
Reference in New Issue
Block a user