55use \Exception ;
66
77/**
8- * Handles thumb image(s) according to the original source given.
8+ * PHP class to resize and scale images
99 */
1010class ImageResize
1111{
@@ -123,6 +123,7 @@ public function loadFromString($imagedata)
123123
124124 /**
125125 * Loads image source and its properties to the instanciated object
126+ *
126127 * @param string $filename
127128 * @return \static
128129 * @throws Exception
@@ -164,6 +165,7 @@ public function loadFromFile($filename)
164165
165166 /**
166167 * Saves new image
168+ *
167169 * @param string $filename
168170 * @param string $image_type
169171 * @param integer $quality
@@ -266,7 +268,7 @@ public function __toString() {
266268 }
267269
268270 /**
269- * Outputs image source to browser
271+ * Outputs image to browser
270272 * @param string $image_type
271273 * @param integer $quality
272274 */
@@ -280,7 +282,8 @@ public function output($image_type = null, $quality = null)
280282 }
281283
282284 /**
283- * Resizes image according to the given height. Width is proportional.
285+ * Resizes image according to the given height (width proportional)
286+ *
284287 * @param integer $height
285288 * @param boolean $allow_enlarge
286289 * @return \static
@@ -296,7 +299,8 @@ public function resizeToHeight($height, $allow_enlarge = false)
296299 }
297300
298301 /**
299- * Resizes image according to the given width. Height is proportional.
302+ * Resizes image according to the given width (height proportional)
303+ *
300304 * @param integer $width
301305 * @param boolean $allow_enlarge
302306 * @return \static
@@ -313,6 +317,7 @@ public function resizeToWidth($width, $allow_enlarge = false)
313317
314318 /**
315319 * Resizes image according to given scale (proportionally)
320+ *
316321 * @param type $scale
317322 * @return \Eventviva\ImageResize
318323 */
@@ -328,6 +333,7 @@ public function scale($scale)
328333
329334 /**
330335 * Resizes image according to the given width and height
336+ *
331337 * @param integer $width
332338 * @param integer $height
333339 * @param boolean $allow_enlarge
@@ -359,8 +365,8 @@ public function resize($width, $height, $allow_enlarge = false)
359365 }
360366
361367 /**
362- * Crops image according to the given width and height for the new saved
363- * image. Crop's position may be configured.
368+ * Crops image according to the given width, height and crop position
369+ *
364370 * @param integer $width
365371 * @param integer $height
366372 * @param boolean $allow_enlarge
@@ -411,6 +417,7 @@ public function crop($width, $height, $allow_enlarge = false, $position = self::
411417
412418 /**
413419 * Gets source width
420+ *
414421 * @return integer
415422 */
416423 public function getSourceWidth ()
@@ -420,6 +427,7 @@ public function getSourceWidth()
420427
421428 /**
422429 * Gets source height
430+ *
423431 * @return integer
424432 */
425433 public function getSourceHeight ()
@@ -429,6 +437,7 @@ public function getSourceHeight()
429437
430438 /**
431439 * Gets width of the destination image
440+ *
432441 * @return integer
433442 */
434443 public function getDestWidth ()
@@ -446,7 +455,8 @@ public function getDestHeight()
446455 }
447456
448457 /**
449- * Gets crop position (X or Y) according to the given position.
458+ * Gets crop position (X or Y) according to the given position
459+ *
450460 * @param integer $expectedSize
451461 * @param integer $position
452462 * @return integer
0 commit comments