Phpfox_Image_Library_Gd

Description

GD Image Layer Class is used to create/manipulate images using GD

Located in /include/library/phpfox/image/library/gd.class.php (line 18)

Phpfox_Image_Abstract
   |
   --Phpfox_Image_Library_Gd
Variable Summary
 resource $_hImg
Method Summary
 Phpfox_Image_Library_Gd __construct ()
 bool addMark (string $sImage)
 bool addText (string $sImage)
 bool addWatermark (string $sImage)
 mixed createThumbnail (string $sImage, string $sDestination, int $nMaxW, int $nMaxH, [bool $bRatio = true], [bool $bSkipCdn = false])
 bool cropImage (string $sImage, string $sDestination, int $iWidth, int $iHeight, int $iStartWidth, int $iStartHeight, int $iScale)
 mixed rotate (string $sImage, string $sCmd)
Variables
bool $thumbLargeThenPic = false (line 25)

Check to identify if a thumnail is larger then the actual image being uploaded

  • access: public
resource $_hImg (line 32)

Resource for the image we are creating

  • access: private

Inherited Variables

Inherited from Phpfox_Image_Abstract

Phpfox_Image_Abstract::$_aInfo
Phpfox_Image_Abstract::$_aTypes
Methods
Constructor __construct (line 38)

Class constructor

  • access: public
Phpfox_Image_Library_Gd __construct ()

Redefinition of:
Phpfox_Image_Abstract::__construct()
Class constructor
addMark (line 388)

Adds a image or text watermark depending on the settings provided by admins.

  • return: TRUE on success, FALSE on failure
  • see: self::addText()
  • see: self::addWatermark()
  • access: public
bool addMark (string $sImage)
  • string $sImage: Full path to the image
addText (line 399)

Adds a watermark text on an image.

  • return: TRUE on success, FALSE on failure
  • access: public
bool addText (string $sImage)
  • string $sImage: Full path to the image
addWatermark (line 487)

Adds an image watermark on an image.

  • return: TRUE on success, FALSE on failure
  • access: public
bool addWatermark (string $sImage)
  • string $sImage: Full path to the image
createThumbnail (line 142)

Create a thumbnail for an image

  • return: FALSE on failure, TRUE or NULL on success
  • access: public
mixed createThumbnail (string $sImage, string $sDestination, int $nMaxW, int $nMaxH, [bool $bRatio = true], [bool $bSkipCdn = false])
  • string $sImage: Full path of the original image
  • string $sDestination: Full path for the newly created thumbnail
  • int $nMaxW: Max width of the thumbnail
  • int $nMaxH: Max height of the thumbnail
  • bool $bRatio: TRUE to keep the aspect ratio and FALSE to not keep it
  • bool $bSkipCdn: Skip the CDN routine
cropImage (line 54)

Crop an image

  • return: FALSE on failure, NULL on success
  • access: public
bool cropImage (string $sImage, string $sDestination, int $iWidth, int $iHeight, int $iStartWidth, int $iStartHeight, int $iScale)
  • string $sImage: Full path to the image we are working with
  • string $sDestination: Full path where the new image will be placed
  • int $iWidth: Width of the working image
  • int $iHeight: Height of the working image
  • int $iStartWidth: Starting point of where we are cropping the image (X)
  • int $iStartHeight: Starting point of where we are cropping the image (Y)
  • int $iScale: Width/Height of what the image should be scalled to
rotate (line 301)

Rotate an image (left or right)

  • return: FALSE on failure, NULL on success
  • access: public
mixed rotate (string $sImage, string $sCmd)
  • string $sImage: Full path to the image
  • string $sCmd: Command to perform. Must be "left" or "right" (without quotes)

Inherited Methods

Inherited From Phpfox_Image_Abstract

 Phpfox_Image_Abstract::__construct()
 Phpfox_Image_Abstract::isImage()
 Phpfox_Image_Abstract::isImageExtension()
 Phpfox_Image_Abstract::_calcSize()
 Phpfox_Image_Abstract::_destroy()
 Phpfox_Image_Abstract::_hex2rgb()
 Phpfox_Image_Abstract::_load()

Documentation generated on Tue, 28 Sep 2010 10:36:40 +0200 by phpDocumentor 1.4.0a2