From d7b6f7e25dbf3d4036e1af6dfdbe82e7a5eeb4de Mon Sep 17 00:00:00 2001 From: Mikael Roos Date: Tue, 15 Oct 2013 01:11:13 +0200 Subject: [PATCH] crop=0,0 for whole width and height --- CImage.php | 4 ++-- README.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CImage.php b/CImage.php index 69f42e9..1db30c3 100644 --- a/CImage.php +++ b/CImage.php @@ -495,8 +495,8 @@ EOD; $height = $this->height; if($this->crop) { - $width = $this->crop['width']; - $height = $this->crop['height']; + $width = $this->crop['width'] = $this->crop['width'] == 0 ? $this->width : $this->crop['width']; + $height = $this->crop['height'] = $this->crop['height'] == 0 ? $this->height : $this->crop['height']; if($this->crop['start_x'] == 'left') { $this->crop['start_x'] = 0; diff --git a/README.md b/README.md index 73eadac..3d3f314 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ v0.4.x (latest) * Always send Last-Modified-Header. * Added `htmlentities()` to verbose output. * Fixed support for jpeg, not only jpg. +* Fixed crop whole image by setting crop=0,0,0,0 v0.4 (2013-10-08)