Documentation

utility.php

Table of Contents

Functions

getDefaultOutputFormat()  : mixed
Returns the default output file format to use given an optional input format.
supportsInputFormat()  : mixed
getImageFormat()  : mixed
Returns the size record from the database specified by its ID.
convertImage()  : mixed
Converts the file of the given resource to the new target file with the specified size. The target file format is determined from the suffix of the target file.
sendFile()  : mixed
showProfileChooser()  : void
Show colour profile selector based on $format_chooser_profiles config
getProfileFileName()  : mixed
failed_format_chooser_checks()  : bool
Helper function to run determine if the plugin should take effect.

Functions

getDefaultOutputFormat()

Returns the default output file format to use given an optional input format.

getDefaultOutputFormat([mixed $inputFormat = null ]) : mixed
Parameters
$inputFormat : mixed = null

supportsInputFormat()

supportsInputFormat(mixed $inputFormat) : mixed
Parameters
$inputFormat : mixed

getImageFormat()

Returns the size record from the database specified by its ID.

getImageFormat(mixed $size) : mixed
Parameters
$size : mixed

convertImage()

Converts the file of the given resource to the new target file with the specified size. The target file format is determined from the suffix of the target file.

convertImage(mixed $resource, mixed $page, mixed $alternative, mixed $target, mixed $width, mixed $height, mixed $profile) : mixed

The original colorspace of the image is retained. If $width and $height are zero, the image keeps its original size.

Parameters
$resource : mixed
$page : mixed
$alternative : mixed
$target : mixed
$width : mixed
$height : mixed
$profile : mixed

sendFile()

sendFile(mixed $filename, string $download_filename[, mixed $usage = -1 ][, mixed $usagecomment = "" ][, mixed $email = "" ]) : mixed
Parameters
$filename : mixed
$download_filename : string
$usage : mixed = -1
$usagecomment : mixed = ""
$email : mixed = ""

showProfileChooser()

Show colour profile selector based on $format_chooser_profiles config

showProfileChooser([string $class = '' ][, string $disabledtext = '' ][, string $ns = '' ]) : void
Parameters
$class : string = ''

CSS class for select

$disabledtext : string = ''

Text to disable and hide inputs

$ns : string = ''

Select ID

getProfileFileName()

getProfileFileName(mixed $profile) : mixed
Parameters
$profile : mixed

failed_format_chooser_checks()

Helper function to run determine if the plugin should take effect.

failed_format_chooser_checks(array<string|int, mixed> $resource) : bool
Parameters
$resource : array<string|int, mixed>

Resource data

Return values
bool
On this page

Search results