Class rcube_image

Description

Image resizer and converter

Located in /lib/Roundcube/rcube_image.php (line 27)


	
			
Class Constant Summary
Variable Summary
 static mixed $extensions
Method Summary
 rcube_image __construct ( $filename)
 bool convert (int $type, [string $filename = null])
 mixed props ()
 mixed resize (int $size, [string $filename = null], [boolean $browser_compat = false])
Variables
static mixed $extensions = array(
self::TYPE_GIF => 'gif',
self::TYPE_JPG => 'jpg',
self::TYPE_PNG => 'png',
self::TYPE_TIF => 'tif',
)
(line 36)
  • access: public
Methods
Constructor __construct (line 44)
rcube_image __construct ( $filename)
  • $filename
convert (line 205)

Convert image to a given type

  • return: True on success, False on failure
  • access: public
bool convert (int $type, [string $filename = null])
  • int $type: Destination file type (see class constants)
  • string $filename: Output filename (if empty, original file will be used and filename extension will be modified)
props (line 54)

Get image properties.

  • return: Hash array with image props like type, width, height
  • access: public
mixed props ()
resize (line 89)

Resize image to a given size. Use only to shrink an image.

If an image is smaller than specified size it will be not resized.

  • return: Output type on success, False on failure
  • access: public
mixed resize (int $size, [string $filename = null], [boolean $browser_compat = false])
  • int $size: Max width/height size
  • string $filename: Output filename
  • boolean $browser_compat: Convert to image type displayable by any browser
Class Constants
TYPE_GIF = 1 (line 31)
TYPE_JPG = 2 (line 32)
TYPE_PNG = 3 (line 33)
TYPE_TIF = 4 (line 34)

Documentation generated on Fri, 03 May 2013 12:45:00 +0200 by phpDocumentor 1.4.4