diff --git a/CImage.php b/CImage.php index de8529c..7535a72 100644 --- a/CImage.php +++ b/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); diff --git a/REVISION.md b/REVISION.md index 36efcff..bb6765a 100644 --- a/REVISION.md +++ b/REVISION.md @@ -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) -------------------------------------