depage-graphics
Loading...
Searching...
No Matches
Graphicsmagick Class Reference

Detailed Description

The graphics_graphicsmagick class provides depage::graphics features using the GraphicsMagick library.

Definition at line 19 of file Graphicsmagick.php.

Public Member Functions

 render ($input, $output=null)
 Main method for image handling.
Public Member Functions inherited from Imagemagick
 __construct ($options=array())
 graphics_graphicsmagick class constructor
 canRead ($ext)
 Checks if extension support reading file type.
Public Member Functions inherited from Graphics
 canWrite ($ext)
 Checks if extension supports writing file type.
 addBackground ($background)
 Background "action".
 addCrop ($width, $height, $x=0, $y=0)
 Adds crop action.
 addResize ($width, $height)
 Adds resize action.
 addThumb ($width, $height)
 Adds thumb action.
 addThumbfill ($width, $height, $centerX=50, $centerY=50)
 Adds thumb-fill action.
 renderFinished ()
 Called after rendering has finished.
 optimizeImage ($filename)
 Opimizes final image through one of the optimization programs.
 setQuality ($quality)
 Sets quality parameter.
 getPageNumber ()
 getPageNumber

Protected Member Functions

 crop ($width, $height, $x=0, $y=0)
 Crop action.
 getImageSize ()
 Determine size of input image.
 getBackground ()
 Generates background command.
Protected Member Functions inherited from Imagemagick
 resize ($width, $height)
 Resize action.
 thumb ($width, $height)
 Thumb action.
 thumbfill ($width, $height, $centerX=50, $centerY=50)
 Thumb action.
 execCommand ()
 Executes ImageMagick command.
 getQuality ()
 Generates quality command.
 getOptimize ()
 Generates optimization parameters.
 getResizeAction ($width, $height)
 Gets the resize action depending on target size.
Protected Member Functions inherited from Graphics
 escapeNumber ($number)
 Validates integers.
 dimensions ($width, $height)
 Scales image dimensions.
 processQueue ()
 Process action queue.
 lock ()
 lock
 unlock ()
 unlock
 obtainFormat ($fileName)
 Determines image format from file extension.
 bypassTest ($width, $height, $x=0, $y=0)
 Tests if action would change current image.
 bypass ()
 Runs bypass (copies file)

Additional Inherited Members

Static Public Member Functions inherited from Graphics
static factory ($options=array())
 graphics object factory
static which ($binary)
 Executes "which" command.
Protected Attributes inherited from Imagemagick
 $command = ''
 Imagemagick command string.
 $executable
 Imagemagick executable path.
 $timeout = 0
 timeout after which the image conversion will be canceled
Protected Attributes inherited from Graphics
 $input
 Input filename.
 $output
 Output filename.
 $format
 Output format.
 $outputLockFp = null
 $otherRender = false
 otherRender is set to true if another render process has already locked file
 $queue = array()
 Action queue array.
 $size = array()
 Image size array(width, height)
 $background
 Image background string.
 $quality = ''
 Image quality string.
 $optimize
 Optimize output images.
 $optimizers
 List of optimizer binaries.
 $limits = []
 limits (mainly for imagemagick and graphicsmagick)
 $inputFormat
 Input image format.
 $outputFormat
 Output image format.
 $bypass = true
 Process bypass bool.

Member Function Documentation

◆ crop()

crop ( $width,
$height,
$x = 0,
$y = 0 )
protected

Adds crop command to command string.

Parameters
int$widthoutput width
int$heightoutput height
int$xcrop x-offset
int$ycrop y-offset
Returns
void

Reimplemented from Imagemagick.

Definition at line 32 of file Graphicsmagick.php.

◆ getBackground()

getBackground ( )
protected
Returns
string $background background part of the command string

Reimplemented from Imagemagick.

Definition at line 135 of file Graphicsmagick.php.

◆ getImageSize()

getImageSize ( )
protected
Returns
void

Reimplemented from Imagemagick.

Definition at line 51 of file Graphicsmagick.php.

◆ render()

render ( $input,
$output = null )

Starts actions, saves image, calls bypass if necessary.

Parameters
string$inputinput filename
string$outputoutput filename
Returns
void

Reimplemented from Imagemagick.

Definition at line 81 of file Graphicsmagick.php.


The documentation for this class was generated from the following file: