mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-04 15:17:42 +02:00
correcting filenaming in cache dir
This commit is contained in:
@@ -88,7 +88,7 @@ class CImage {
|
||||
}
|
||||
}
|
||||
$subdir = str_replace('/', '-', dirname($this->imageName));
|
||||
$subdir = '.' ? '_.' : $subdir;
|
||||
$subdir = ($subdir == '.') ? '_.' : $subdir;
|
||||
return $this->saveFolder . '/' . $subdir . '_' . $parts['filename'] . '_' . round($this->newWidth) . '_' . round($this->newHeight) . $crop . $cropToFit . $crop_x . $crop_y . $quality . $filters . '.' . $parts['extension'];
|
||||
}
|
||||
|
||||
|
19
README.md
19
README.md
@@ -4,9 +4,9 @@ Image conversion on the fly using PHP
|
||||
About
|
||||
-------------------------------------
|
||||
|
||||
The `CImage.php` is a PHP class that can resize and crop images on the fly and output
|
||||
them to, for example to a webpage. The class preserves a cache of the generated images
|
||||
and responds with HTTP 304 (not modified) if the image has not changed.
|
||||
The `CImage.php` is a PHP class that can resize and crop images on the fly on the server side
|
||||
and output them to, for example to a webpage. The class preserves a cache of the generated
|
||||
images and responds with HTTP 304 (not modified) if the image has not changed.
|
||||
|
||||
The file `img.php` uses `CImage.php` to resize images. It is a usecase on how to use
|
||||
the class. `img.php` is useful for webpages which want to dynamically resize the images.
|
||||
@@ -64,6 +64,17 @@ center of the image from which the crop is done.
|
||||
* Support for resizing opaque images.
|
||||
* Clean up code in `CImage.php`.
|
||||
|
||||
|
||||
v0.4 (latest)
|
||||
|
||||
* Nothing yet.
|
||||
|
||||
|
||||
v0.31 (2012-10-02)
|
||||
|
||||
* Corrected error on naming cache-files using subdir.
|
||||
|
||||
|
||||
v0.3 (2012-10-02)
|
||||
|
||||
* Added crop. Can crop a area (`width`, `height`, `start_x`, `start_y`) from the original
|
||||
@@ -72,6 +83,7 @@ image.
|
||||
* Pre-defined sizes can be configured for width in `img.php`.
|
||||
* Corrected to make crop work with width or height in combination with crop-to-fit.
|
||||
|
||||
|
||||
v0.2 (2012-05-09)
|
||||
|
||||
* Implemented filters as in http://php.net/manual/en/function.imagefilter.php
|
||||
@@ -80,6 +92,7 @@ v0.2 (2012-05-09)
|
||||
* Added quality-setting.
|
||||
* Added testcases for above.
|
||||
|
||||
|
||||
v0.1.1 (2012-04-27)
|
||||
|
||||
* Corrected calculation where both width and height were set.
|
||||
|
Reference in New Issue
Block a user