ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
|
Public Member Functions | |
__construct (bool $throw_on_error=false) | |
thumbnail (FileStream $stream, int $fit_into_size, ?ImageOutputOptions $image_output_options=null) | |
@description Creates an image from the given stream which fits into the given size and keeps the aspect ratio. More... | |
croppedSquare (FileStream $stream, int $square_size, ?ImageOutputOptions $image_output_options=null) | |
@description Creates an image from the given stream which fits into the given size, but is cropped to fill the whole square. More... | |
resizeByWidth (FileStream $stream, int $width, ?ImageOutputOptions $image_output_options=null) | |
@description Resizes an image to an image with the given width. More... | |
resizeByHeight (FileStream $stream, int $height, ?ImageOutputOptions $image_output_options=null) | |
@description Resizes an image to an image with the given height. More... | |
resizeToFixedSize (FileStream $stream, int $width, int $height, bool $crop_or_otherwise_squeeze=true, ?ImageOutputOptions $image_output_options=null) | |
@description Creates an image from the given stream, resized to width and height given. More... | |
convertToFormat (FileStream $stream, string $to_format, ?int $width=null, ?int $height=null, ?ImageOutputOptions $image_output_options=null) | |
@description Creates an image from the given stream, converted to the desired format. More... | |
Protected Attributes | |
ImageConversionOptions | $conversion_options |
ImageOutputOptions | $image_output_options |
Private Member Functions | |
merge (?ImageOutputOptions $image_output_options) | |
Definition at line 29 of file Images.php.
ILIAS\Filesystem\Util\Convert\Images::__construct | ( | bool | $throw_on_error = false | ) |
bool | $throw_on_error | if there is any error, throw an exception, otherwise one must check with isOK() |
Definition at line 37 of file Images.php.
ILIAS\Filesystem\Util\Convert\Images::convertToFormat | ( | FileStream | $stream, |
string | $to_format, | ||
?int | $width = null , |
||
?int | $height = null , |
||
?ImageOutputOptions | $image_output_options = null |
||
) |
@description Creates an image from the given stream, converted to the desired format.
Currently supported target formats are:
Definition at line 158 of file Images.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withHeight().
ILIAS\Filesystem\Util\Convert\Images::croppedSquare | ( | FileStream | $stream, |
int | $square_size, | ||
?ImageOutputOptions | $image_output_options = null |
||
) |
@description Creates an image from the given stream which fits into the given size, but is cropped to fill the whole square.
Use getStream() to get final image.
Definition at line 72 of file Images.php.
|
private |
Definition at line 185 of file Images.php.
References ILIAS\Filesystem\Util\Convert\ImageOutputOptions\getFormat(), ILIAS\Filesystem\Util\Convert\ImageOutputOptions\getQuality(), and ILIAS\Filesystem\Util\Convert\ImageOutputOptions\withQuality().
ILIAS\Filesystem\Util\Convert\Images::resizeByHeight | ( | FileStream | $stream, |
int | $height, | ||
?ImageOutputOptions | $image_output_options = null |
||
) |
@description Resizes an image to an image with the given height.
The width is calculated to keep the aspect ratio. Use getStream() to get final image.
Definition at line 113 of file Images.php.
ILIAS\Filesystem\Util\Convert\Images::resizeByWidth | ( | FileStream | $stream, |
int | $width, | ||
?ImageOutputOptions | $image_output_options = null |
||
) |
@description Resizes an image to an image with the given width.
The height is calculated to keep the aspect ratio. Use getStream() to get final image.
Definition at line 93 of file Images.php.
ILIAS\Filesystem\Util\Convert\Images::resizeToFixedSize | ( | FileStream | $stream, |
int | $width, | ||
int | $height, | ||
bool | $crop_or_otherwise_squeeze = true , |
||
?ImageOutputOptions | $image_output_options = null |
||
) |
@description Creates an image from the given stream, resized to width and height given.
The original image can be cropped (to keep aspect ratio) or not (which squeezes the original to fit). Use getStream() to get final image.
Definition at line 133 of file Images.php.
Referenced by ILIAS\Filesystem\Util\ImageConversionTest\testFailed().
ILIAS\Filesystem\Util\Convert\Images::thumbnail | ( | FileStream | $stream, |
int | $fit_into_size, | ||
?ImageOutputOptions | $image_output_options = null |
||
) |
@description Creates an image from the given stream which fits into the given size and keeps the aspect ratio.
Use getStream() to get final image.
Definition at line 53 of file Images.php.
|
protected |
Definition at line 31 of file Images.php.
|
protected |
Definition at line 32 of file Images.php.