ILIAS
trunk Revision v11.0_alpha-1866-gfa368f7776e
|
Public Member Functions | |
withThrowOnError (bool $throw_on_error) | |
If there is any throwable during convertion, this will be thworn again. More... | |
withMakeTemporaryFiles (bool $make_temporary_files) | |
if passing a stream from memory, make a temporary file for this. More... | |
withFitIn (int $max_size) | |
Fit the image into the given size. More... | |
withKeepAspectRatio (bool $keep_aspect_ratio) | |
Keep the aspect ratio while resizing the image. More... | |
withCrop (bool $crop) | |
Crops the final image if needed. More... | |
withKeepDimensions (bool $keep) | |
No resizing, the original image dimension will be used. More... | |
withWidth (int $width) | |
Resize the image to the given width. More... | |
withHeight (int $height) | |
Resize the image to the given height. More... | |
withFixedDimensions (int $width, int $height) | |
Resizes the Image to a fixed size. More... | |
withOutputPath (string $output_path) | |
withBackgroundColor (string $background_color) | |
Set a background color for the image. More... | |
getBackgroundColor () | |
getOutputPath () | |
getDimensionMode () | |
getHeight () | |
getWidth () | |
keepAspectRatio () | |
hasCrop () | |
throwOnError () | |
makeTemporaryFiles () | |
Data Fields | |
const | DIMENSION_MODE_NONE = 0 |
const | DIMENSION_MODE_FIT = 1 |
const | DIMENSTION_MODE_RESIZE_TO_FIXED = 2 |
const | DIMENSTION_MODE_RESIZE_BY_HEIGHT = 3 |
const | DIMENSTION_MODE_RESIZE_BY_WIDTH = 4 |
const | DIMENSION_MODE_KEEP = 5 |
Protected Member Functions | |
checkBackgroundColor (string $background_color) | |
Private Attributes | |
int | $dimension_mode = self::DIMENSION_MODE_NONE |
int | $height = null |
int | $width = null |
bool | $keep_aspect_ratio = true |
string | $background_color = null |
string | $output_path = null |
bool | $crop = true |
bool | $throw_on_error = false |
bool | $make_temporary_files = false |
Definition at line 27 of file ImageConversionOptions.php.
|
protected |
Definition at line 214 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withBackgroundColor().
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::getBackgroundColor | ( | ) |
Definition at line 166 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$background_color.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::getDimensionMode | ( | ) |
Definition at line 177 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$dimension_mode.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::getHeight | ( | ) |
Definition at line 182 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$height.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::getOutputPath | ( | ) |
Definition at line 171 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$output_path.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::getWidth | ( | ) |
Definition at line 187 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$width.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::hasCrop | ( | ) |
Definition at line 199 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$crop.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::keepAspectRatio | ( | ) |
Definition at line 193 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$keep_aspect_ratio.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::makeTemporaryFiles | ( | ) |
Definition at line 209 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$make_temporary_files.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::throwOnError | ( | ) |
Definition at line 204 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$throw_on_error.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withBackgroundColor | ( | string | $background_color | ) |
Set a background color for the image.
This is used e.g. while converting transparent pngs to jpgs.
Definition at line 157 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$background_color, and ILIAS\Filesystem\Util\Convert\ImageConversionOptions\checkBackgroundColor().
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withCrop | ( | bool | $crop | ) |
Crops the final image if needed.
Definition at line 94 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$crop.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withFitIn | ( | int | $max_size | ) |
Fit the image into the given size.
Depending on the withCrop option, the image will be cropped or not.
Definition at line 73 of file ImageConversionOptions.php.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withFixedDimensions | ( | int | $width, |
int | $height | ||
) |
Resizes the Image to a fixed size.
Use withCrop() and withKeepAspectRatio() if needed.
Definition at line 137 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withHeight().
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withHeight | ( | int | $height | ) |
Resize the image to the given height.
Depends on withWidth() if the image will be resized to a fixed size or depending on the height.
Definition at line 126 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$height, and null.
Referenced by ILIAS\Filesystem\Util\Convert\Images\convertToFormat(), and ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withFixedDimensions().
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withKeepAspectRatio | ( | bool | $keep_aspect_ratio | ) |
Keep the aspect ratio while resizing the image.
If used with withCrop, the image will be cropped as well to fit the size.
Definition at line 84 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$keep_aspect_ratio.
Referenced by ILIAS\Filesystem\Util\Convert\Images\convertToFormat().
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withKeepDimensions | ( | bool | $keep | ) |
No resizing, the original image dimension will be used.
Definition at line 104 of file ImageConversionOptions.php.
References null.
Referenced by ILIAS\Filesystem\Util\Convert\Images\convertToFormat().
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withMakeTemporaryFiles | ( | bool | $make_temporary_files | ) |
if passing a stream from memory, make a temporary file for this.
otherwise, the php://memory stream will be used which can cause problems with imagick in some circumstances, but is faster.
Definition at line 63 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$make_temporary_files.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withOutputPath | ( | string | $output_path | ) |
If not set, the image will be converted in memory.
Definition at line 146 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$output_path.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withThrowOnError | ( | bool | $throw_on_error | ) |
If there is any throwable during convertion, this will be thworn again.
otherwise one must check with isOK()
Definition at line 50 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$throw_on_error.
ILIAS\Filesystem\Util\Convert\ImageConversionOptions::withWidth | ( | int | $width | ) |
Resize the image to the given width.
Depends on withHeight() if the image will be resized to a fixed size or depending on the width.
Definition at line 115 of file ImageConversionOptions.php.
References ILIAS\Filesystem\Util\Convert\ImageConversionOptions\$width, and null.
Referenced by ILIAS\Filesystem\Util\Convert\Images\convertToFormat().
|
private |
Definition at line 40 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConversionOptions\getBackgroundColor(), and ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withBackgroundColor().
|
private |
Definition at line 42 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConversionOptions\hasCrop(), and ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withCrop().
|
private |
Definition at line 36 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConversionOptions\getDimensionMode().
|
private |
Definition at line 37 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConversionOptions\getHeight(), and ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withHeight().
|
private |
Definition at line 39 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConversionOptions\keepAspectRatio(), and ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withKeepAspectRatio().
|
private |
Definition at line 44 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConversionOptions\makeTemporaryFiles(), and ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withMakeTemporaryFiles().
|
private |
Definition at line 41 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConversionOptions\getOutputPath(), and ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withOutputPath().
|
private |
Definition at line 43 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConversionOptions\throwOnError(), and ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withThrowOnError().
|
private |
Definition at line 38 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConversionOptions\getWidth(), and ILIAS\Filesystem\Util\Convert\ImageConversionOptions\withWidth().
const ILIAS\Filesystem\Util\Convert\ImageConversionOptions::DIMENSION_MODE_FIT = 1 |
Definition at line 30 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConverter\handleImageDimension().
const ILIAS\Filesystem\Util\Convert\ImageConversionOptions::DIMENSION_MODE_KEEP = 5 |
Definition at line 34 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConverter\handleImageDimension().
const ILIAS\Filesystem\Util\Convert\ImageConversionOptions::DIMENSION_MODE_NONE = 0 |
Definition at line 29 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConverter\handleImageDimension().
const ILIAS\Filesystem\Util\Convert\ImageConversionOptions::DIMENSTION_MODE_RESIZE_BY_HEIGHT = 3 |
Definition at line 32 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConverter\handleImageDimension().
const ILIAS\Filesystem\Util\Convert\ImageConversionOptions::DIMENSTION_MODE_RESIZE_BY_WIDTH = 4 |
Definition at line 33 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConverter\handleImageDimension().
const ILIAS\Filesystem\Util\Convert\ImageConversionOptions::DIMENSTION_MODE_RESIZE_TO_FIXED = 2 |
Definition at line 31 of file ImageConversionOptions.php.
Referenced by ILIAS\Filesystem\Util\Convert\ImageConverter\handleImageDimension().