Class ImageMagickProcessor

Description

Class for Processing images using ImageMagick

  • version: $Id: ImageMagickProcessor.class.php,v 1.10 2007/09/04 20:25:24 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/ImageProcessor/ImageMagickProcessor.class.php (line 14)


	
			
Method Summary
object ImageMagickProcessor (string $thumbnailFormat, [string $ImageMagickPath = "/usr/bin"], [string $ImageMagickTempDir = "/tmp"])
string generateThumbnailData (string $format, string $data)
string getResizedData (string $format, integer $size, string $data)
string getResizedFormat (string $format)
string getWebsafeData (string $format, integer $size, string $data)
string getWebsafeFormat (string $format)
boolean isSupported (string $format)
string _generateData (string $inputExtension, string $ouputExtension, integer $size, string $inputData)
Methods
Constructor ImageMagickProcessor (line 29)

Constructor

  • since: 10/22/04
  • access: public
object ImageMagickProcessor (string $thumbnailFormat, [string $ImageMagickPath = "/usr/bin"], [string $ImageMagickTempDir = "/tmp"])
  • string $thumbnailFormat: The mime type of the format you which thumbnails to be generated in. image/jpeg or image/png are recommended.
  • string $ImageMagickPath: The path to the ImageMagick functions if ImageMagick is availible.
  • string $ImageMagickTempDir: Directory in which to place images while processing.
generateThumbnailData (line 198)

Generate a thumbnail from the image format/data passed

  • return: The thumbnail data of $thumbnailFormat mime type.
  • since: 10/22/04
  • access: public
string generateThumbnailData (string $format, string $data)
  • string $format: The format of the source image
  • string $data: The data of the source image
getResizedData (line 237)

Generate a resized image from the image format/data passed

  • return: The thumbnail data of a mime type that can be obtained with getResizedFormat.
  • since: 10/22/04
  • access: public
string getResizedData (string $format, integer $size, string $data)
  • string $format: The format of the source image
  • integer $size: The max size in pixels of the resulting image
  • string $data: The data of the source image
getResizedFormat (line 216)

Get the format that a resized image will be returned in

  • return: The mime type.
  • since: 10/22/04
  • access: public
string getResizedFormat (string $format)
  • string $format: The format of the source image
getWebsafeData (line 281)

Generate a web-safe resized image from the image format/data passed

  • return: The thumbnail data of a mime type that can be obtained with getResizedFormat.
  • since: 10/22/04
  • access: public
string getWebsafeData (string $format, integer $size, string $data)
  • string $format: The format of the source image
  • integer $size: The max size in pixels of the resulting image
  • string $data: The data of the source image
getWebsafeFormat (line 256)

Get the format that a web-safe resized image will be returned in

  • return: The mime type.
  • since: 10/22/04
  • access: public
string getWebsafeFormat (string $format)
  • string $format: The format of the source image
isSupported (line 176)

Return True if we support this format

  • since: 11/5/04
  • access: public
boolean isSupported (string $format)
  • string $format
_generateData (line 303)

Generate a new image with possible conversion to a new type and size

  • since: 11/5/04
  • access: public
string _generateData (string $inputExtension, string $ouputExtension, integer $size, string $inputData)
  • string $inputExtension: The extension that corresponds to the input data.
  • string $ouputExtension: The extension that corresponds to the output data.
  • integer $size: The max size in pixels of the output image
  • string $inputData: The input data.

Documentation generated on Wed, 19 Sep 2007 10:24:36 -0400 by phpDocumentor 1.3.0RC3