Documentation

ImageFile extends Image
in package

Class ImageFile

Table of Contents

Methods

__construct()  : mixed
Image constructor with adapter configuration from Grav.
__destruct()  : mixed
Destruct also image object.
applyExifOrientation()  : Image
cacheFile()  : string
This is the same as the Gregwar Image class except this one fires a Grav Event on creation of new cached file
clearOperations()  : void
Clear previously applied operations
fixOrientation()  : mixed
Read exif rotation from file and apply it.
generateHash()  : mixed
Generates the hash.
getHash()  : string
Gets the hash.

Methods

__construct()

Image constructor with adapter configuration from Grav.

public __construct([string|null $originalFile = null ][, int|null $width = null ][, int|null $height = null ]) : mixed
Parameters
$originalFile : string|null = null
$width : int|null = null
$height : int|null = null

__destruct()

Destruct also image object.

public __destruct() : mixed
Attributes
#[ReturnTypeWillChange]

applyExifOrientation()

public applyExifOrientation(mixed $exif_orienation) : Image
Parameters
$exif_orienation : mixed
Return values
Image

cacheFile()

This is the same as the Gregwar Image class except this one fires a Grav Event on creation of new cached file

public cacheFile([string $type = 'jpg' ][, int $quality = 80 ][, bool $actual = false ][, array<string|int, mixed> $extras = [] ]) : string
Parameters
$type : string = 'jpg'

the image type

$quality : int = 80

the quality (for JPEG)

$actual : bool = false
$extras : array<string|int, mixed> = []
Return values
string

clearOperations()

Clear previously applied operations

public clearOperations() : void

fixOrientation()

Read exif rotation from file and apply it.

public fixOrientation() : mixed

generateHash()

Generates the hash.

public generateHash([string $type = 'guess' ][, int $quality = 80 ][, array<string|int, mixed> $extras = [] ]) : mixed
Parameters
$type : string = 'guess'
$quality : int = 80
$extras : array<string|int, mixed> = []

getHash()

Gets the hash.

public getHash([string $type = 'guess' ][, int $quality = 80 ][, array<string|int, mixed> $extras = [] ]) : string
Parameters
$type : string = 'guess'
$quality : int = 80
$extras : array<string|int, mixed> = []
Return values
string

        
On this page

Search results