Changeset 1848 for trunk/system/libraries/Image.php
- Timestamp:
- 01/28/2008 02:31:27 PM (12 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Image.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Image.php
r1844 r1848 128 128 throw new Kohana_Exception('image.invalid_height', $height); 129 129 130 if (empty($width) AND empty($height)) 131 throw new Kohana_Exception('image.invalid_dimensions', __FUNCTION__); 132 130 133 if ($master === NULL) 131 134 { … … 171 174 if ( ! $this->valid_size('left', $left)) 172 175 throw new Kohana_Exception('image.invalid_left', $left); 176 177 if (empty($width) AND empty($height)) 178 throw new Kohana_Exception('image.invalid_dimensions', __FUNCTION__); 173 179 174 180 $this->actions['crop'] = array … … 243 249 public function quality($value) 244 250 { 245 $this->actions['quality'] = $value;251 $this->actions['quality'] = max(1, min($amount, 100)); 246 252 247 253 return $this;
