\Fuman_File_Processor_Crop

Used to crop an image.

Summary

Methods
Properties
Constants
createImageMeta()
updateFileMetaProperty()
process()
No public properties found
No constants found
_getImageHandle()
_createImageHandle()
_saveImage()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

createImageMeta()

createImageMeta(\Fuman_File  $file) : boolean

Creates image meta data (with, height) and ands info to meta property

Parameters

\Fuman_File $file

Returns

boolean

updateFileMetaProperty()

updateFileMetaProperty(\Fuman_File  $file, integer  $width, integer  $height) 

Update file meta property

Parameters

\Fuman_File $file
integer $width
integer $height

process()

process(\Fuman_File  $file, null|\stdClass  $options = null) : boolean

Options as follows: - targetX - targetY - sourceX - sourceY

Parameters

\Fuman_File $file
null|\stdClass $options

Throws

\Fuman_Exception

Returns

boolean

_getImageHandle()

_getImageHandle(\Fuman_File  $file) : boolean|\stdClass

Create image handle

Parameters

\Fuman_File $file

Returns

boolean|\stdClass

_createImageHandle()

_createImageHandle(integer  $width, integer  $height, array  $imageInfo) : resource

Create image handle

Parameters

integer $width
integer $height
array $imageInfo

Returns

resource

_saveImage()

_saveImage(\Fuman_File  $file, \stdClass  $imageData) : boolean

Saves image depending on mime type (jpeg, png, gif)

Parameters

\Fuman_File $file
\stdClass $imageData

Returns

boolean