PHP Class Webiny\Component\Image\Bridge\AbstractImage

Inheritance: implements ImageInterface, use trait Webiny\Component\StdLib\StdLibTrait
Show file Open project: Webiny/Framework

Public Methods

Method Description
getFormat ( ) : string Get the image mime-type format.
save ( File $file = null, array $options = [] ) : boolean Saves the image in the defined storage.
setDestination ( File $destination ) Sets the image destination.
setFormat ( string $format ) Sets image mime-type format.

Method Details

getFormat() public method

Can be [jpg, jpeg, png, gif].
public getFormat ( ) : string
return string

save() public method

Saves the image in the defined storage.
public save ( File $file = null, array $options = [] ) : boolean
$file Webiny\Component\Storage\File\File Where to save the image.
$options array An array of options. Possible keys are [quality, filters].
return boolean True if image is save successfully, otherwise false.

setDestination() public method

Sets the image destination.
public setDestination ( File $destination )
$destination Webiny\Component\Storage\File\File Destination where to store the image.

setFormat() public method

Sets image mime-type format.
public setFormat ( string $format )
$format string Format name. Supported formats are [jpg, jpeg, png, gif]