Constants

PROP_JPG_QUALITY

PROP_JPG_QUALITY = 'jpg_quality'

PROP_PNG_COMPRESSION

PROP_PNG_COMPRESSION = 'png_compression'

PROP_WEBP_QUALITY

PROP_WEBP_QUALITY = 'webp_quality'

PROP_INTERLACE

PROP_INTERLACE = 'interlace'

Methods

__construct()

__construct(string  $mediaPath) : mixed

Parameters

string $mediaPath

Returns

mixed —

getMediaPath()

getMediaPath() : null|string

Returns the original path of the media.

To get the current source path (can be changed by effects) use getSourcePath instead.

Returns

null|string —

setMediaPath()

setMediaPath(string|null  $mediaPath) : mixed

Parameters

string|null $mediaPath

Returns

mixed —

getMediaFilename()

getMediaFilename() : string

Returns

string —

setMediaFilename()

setMediaFilename(string  $filename) : mixed

Parameters

string $filename

Returns

mixed —

setHeader()

setHeader(string  $name, string  $value) : mixed

Parameters

string $name
string $value

Returns

mixed —

getHeader()

getHeader() : array<string,string>

Returns

array

asImage()

asImage() : mixed

Returns

mixed —

refreshImageDimensions()

refreshImageDimensions() : mixed

Returns

mixed —

getFormat()

getFormat() : string

Returns

string —

setFormat()

setFormat(string  $format) : mixed

Parameters

string $format

Returns

mixed —

sendMedia()

sendMedia(string  $sourceCachePath, string  $headerCachePath, bool  $save = false) : mixed

Parameters

string $sourceCachePath
string $headerCachePath
bool $save

Returns

mixed —

save()

save(string  $sourceCachePath, string  $headerCachePath) : mixed

Parameters

string $sourceCachePath
string $headerCachePath

Returns

mixed —

exists()

exists() : bool

Returns

bool —

getImage()

getImage() : resource

Returns

resource —

setImage()

setImage(resource  $src) : mixed

Parameters

resource $src

Returns

mixed —

setSourcePath()

setSourcePath(string  $path) : mixed

Parameters

string $path

Returns

mixed —

getSourcePath()

getSourcePath() : string

Returns the current source path.

To get the original media path use getMediaPath() instead.

Returns

string —

getSource()

getSource() : string

Returns

string —

setImageProperty()

setImageProperty(string  $name, mixed  $value) : mixed

Parameters

string $name
mixed $value

Returns

mixed —

getImageProperty()

getImageProperty(string  $name, mixed  $default = null) : null|mixed

Parameters

string $name
mixed $default

Returns

null|mixed —

getWidth()

getWidth() : int|null

Returns

int|null —

getHeight()

getHeight() : int|null

Returns

int|null —

getImageWidth()

getImageWidth() : mixed

Returns

mixed —

getImageHeight()

getImageHeight() : mixed

Returns

mixed —

getImageSource()

getImageSource() : string

Returns

string —