phpDocumentor ImageMagick
Classes
[ class tree: ImageMagick ] [ index: ImageMagick ] [ all elements ]

Class: ImageMagickToolkitHelper

Source Location: /modules/imagemagick/classes/ImageMagickToolkitHelper.class

Class ImageMagickToolkitHelper

Method Summary
array   discoverBinary()   Check if we need to prefix every command with another binary name
array   discoverColorspaceSupport()   Checks if we can detect and convert jpegs with CMYK colorspace
array   discoverCompositeCmd()   Checks which composite binary is available in this ImageMagick.
array   discoverMimeTypes()   Find out which mime types our ImageMagick installation supports.
array   discoverRemoveMetaDataSwitch()   Checks which switch to use to remove meta-data from jpegs
array   discoverVersion()   Discovers the version of the installed ImageMagick/GraphicsMagick
array   getCommand()   Return an array of cmds needed to execute ImageMagick/GraphicsMagick commands
GalleryStatus   getOperationsAndProperties()   Figure out what operations and properties are supported by the ImageMagickToolkit and return them.
GalleryStatus   savePlatformParameters()   Given a imageMagickPath, discover and store some platform-specific settings in the plugins parameter map
array   testBinaries()   Test if the given path has a working set of ImageMagick binaries.

[ Top ]
Methods
discoverBinary  [line 534]

  array discoverBinary( [ $imageMagickPath = null]  )

Check if we need to prefix every command with another binary name

ImageMagick 4.x: <none> ImageMagick 5.x, 6.x: <none> GraphicsMagick: "gm"

Parameters:
   $imageMagickPath: 

API Tags:
Return:  GalleryStatus string name of the binary


[ Top ]
discoverColorspaceSupport  [line 698]

  array discoverColorspaceSupport( [ $imageMagickPath = null]  )

Checks if we can detect and convert jpegs with CMYK colorspace

Parameters:
   $imageMagickPath: 

API Tags:
Return:  GalleryStatus boolean true if CMYK is supported


[ Top ]
discoverCompositeCmd  [line 611]

  array discoverCompositeCmd( [ $imageMagickPath = null]  )

Checks which composite binary is available in this ImageMagick.

ImageMagick 4.x: combine ImageMagick 5.x, 6.x: composite GraphicsMagick: composite

Parameters:
   $imageMagickPath: 

API Tags:
Return:  GalleryStatus string name of the binary (defaults to composite)


[ Top ]
discoverMimeTypes  [line 238]

  array discoverMimeTypes( [string $imageMagickPath = null]  )

Find out which mime types our ImageMagick installation supports.

This is done by trying to run 'identify' on a couple of sample images.

Parameters:
string   $imageMagickPath:  (optional) path to the ImageMagick we are testing; if not given, use the 'imagemagick.path' module parameter

API Tags:
Return:  GalleryStatus array supported mime-types


[ Top ]
discoverRemoveMetaDataSwitch  [line 656]

  array discoverRemoveMetaDataSwitch( [ $imageMagickPath = null]  )

Checks which switch to use to remove meta-data from jpegs

ImageMagick 4.x: <none> ImageMagick 5.x, 6.x, GraphicsMagick: +profile '*' ImageMagick 6.x: -strip

Parameters:
   $imageMagickPath: 

API Tags:
Return:  GalleryStatus array the needed parameters


[ Top ]
discoverVersion  [line 578]

  array discoverVersion( [ $imageMagickPath = null]  )

Discovers the version of the installed ImageMagick/GraphicsMagick

Parameters:
   $imageMagickPath: 

API Tags:
Return:  GalleryStatus array string "ImageMagick" | "GraphicsMagick" string version boolean true if version is vulnerable to http://nvd.nist.gov/nvd.cfm?cvename=CVE-2007-1797 or http://nvd.nist.gov/nvd.cfm?cvename=CVE-2006-3744 or http://nvd.nist.gov/nvd.cfm?cvename=CVE-2005-1739


[ Top ]
getCommand  [line 199]

  array getCommand( string $cmd, [string $imageMagickPath = null]  )

Return an array of cmds needed to execute ImageMagick/GraphicsMagick commands

Parameters:
string   $cmd:  an ImageMagick command (eg. "convert")
string   $imageMagickPath:  (optional) ImageMagick path (default=module configuration)

API Tags:
Return:  GalleryStatus array commands


[ Top ]
getOperationsAndProperties  [line 44]

  GalleryStatus getOperationsAndProperties( )

Figure out what operations and properties are supported by the ImageMagickToolkit and return them.


API Tags:
Return:  a status code array('operations' => ..., 'properties' => ...)


[ Top ]
savePlatformParameters  [line 749]

  GalleryStatus savePlatformParameters( [ $imageMagickPath = null]  )

Given a imageMagickPath, discover and store some platform-specific settings in the plugins parameter map

Parameters:
   $imageMagickPath: 


[ Top ]
testBinaries  [line 344]

  array testBinaries( string $imageMagickPath  )

Test if the given path has a working set of ImageMagick binaries.

This is done by trying to run 'identify' on a sample image.

Parameters:
string   $imageMagickPath:  path to the ImageMagick we are testing

API Tags:
Return:  GalleryStatus general status of tests array ('name' => string: the name of the binary, 'success' => boolean: test successful? 'message' => string: the error message, in case of IMAGEMAGIC_TEST_ERROR)


[ Top ]

Documentation generated on Fri, 03 Oct 2008 05:20:57 -0700 by phpDocumentor 1.3.0RC6