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

Detailed Description

Definition at line 19 of file Imagick.php.

Public Member Functions

 canRead ($ext)
 Checks if extension support reading file type.
 render ($input, $output=null)
 Main method for image handling.
Public Member Functions inherited from Graphics
 __construct ($options=array())
 graphics class constructor
 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
 resize ($width, $height)
 resize
 thumb ($width, $height)
 thumb
 thumbfill ($width, $height, $centerX=50, $centerY=50)
 thumbfill
 load ()
 load
 save ()
 save
 setBackground ()
 Generates background command.
 getResizeFilter ($width, $height)
 Gets the resize filter depending on target size.
 getImageSize ()
 Determine size of input image.
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.
 getQuality ()
 Returns quality-index for current image format.
 bypassTest ($width, $height, $x=0, $y=0)
 Tests if action would change current image.
 bypass ()
 Runs bypass (copies file)

Protected Attributes

 $image = null
 image
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.

Additional Inherited Members

Static Public Member Functions inherited from Graphics
static factory ($options=array())
 graphics object factory
static which ($binary)
 Executes "which" command.

Member Function Documentation

◆ canRead()

canRead ( $ext)
Parameters
string$extfile extension
Returns
bool true if image type can be read

Reimplemented from Graphics.

Definition at line 32 of file Imagick.php.

◆ crop()

crop ( $width,
$height,
$x = 0,
$y = 0 )
protected
Parameters
mixed$width,$height,$x,$y
Returns
void

Definition at line 43 of file Imagick.php.

◆ getImageSize()

getImageSize ( )
protected
Returns
void

Definition at line 209 of file Imagick.php.

◆ getResizeFilter()

getResizeFilter ( $width,
$height )
protected

this assumes that all images below 160px width or height will be thumbnails everything bigger gets resized slowly in better quality

Returns
int of the one of the filter constants

Definition at line 197 of file Imagick.php.

◆ load()

load ( )
protected
Parameters
mixed
Returns
void

Definition at line 143 of file Imagick.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 Graphics.

Definition at line 230 of file Imagick.php.

◆ resize()

resize ( $width,
$height )
protected
Parameters
mixed$width,$height
Returns
void

Definition at line 59 of file Imagick.php.

◆ save()

save ( )
protected
Parameters
mixed
Returns
void

Definition at line 157 of file Imagick.php.

◆ setBackground()

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

Definition at line 176 of file Imagick.php.

◆ thumb()

thumb ( $width,
$height )
protected
Parameters
mixed$width,$height
Returns
void

Definition at line 84 of file Imagick.php.

◆ thumbfill()

thumbfill ( $width,
$height,
$centerX = 50,
$centerY = 50 )
protected
Parameters
mixed$width,$height
Returns
void

Definition at line 112 of file Imagick.php.

Field Documentation

◆ $image

$image = null
protected

Definition at line 24 of file Imagick.php.


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