|
| __construct () |
|
| thumbnail (string $path_to_original, string $path_to_output, int $fit_into_size, string $output_format=ImageOutputOptions::FORMAT_KEEP, int $image_quality=75) |
|
| croppedSquare (string $path_to_original, string $path_to_output, int $square_size, string $output_format=ImageOutputOptions::FORMAT_KEEP, int $image_quality=75) |
|
| resizeByWidth (string $path_to_original, string $path_to_output, int $width, string $output_format=ImageOutputOptions::FORMAT_KEEP, int $image_quality=60) |
|
| resizeByHeight (string $path_to_original, string $path_to_output, int $height, string $output_format=ImageOutputOptions::FORMAT_KEEP, int $image_quality=60) |
|
| resizeToFixedSize (string $path_to_original, string $path_to_output, int $width, int $height, bool $crop_if_true_and_resize_if_false=true, string $output_format=ImageOutputOptions::FORMAT_KEEP, int $image_quality=60) |
|
| convertToFormat (string $path_to_original, string $path_to_output, string $output_format, ?int $width=null, ?int $height=null) |
|
- Author
- Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s
- Deprecated:
- ise \ILIAS\Filesystem\Util\Convert\Images instead
Definition at line 31 of file LegacyImages.php.
◆ __construct()
ILIAS\Filesystem\Util\Convert\LegacyImages::__construct |
( |
| ) |
|
◆ buildStream()
ILIAS\Filesystem\Util\Convert\LegacyImages::buildStream |
( |
string |
$path_to_original | ) |
|
|
private |
Definition at line 196 of file LegacyImages.php.
196 : Stream|FileStream
197 {
199 }
static ofResource($resource)
Wraps an already created resource with the stream abstraction.
◆ convertToFormat()
ILIAS\Filesystem\Util\Convert\LegacyImages::convertToFormat |
( |
string |
$path_to_original, |
|
|
string |
$path_to_output, |
|
|
string |
$output_format, |
|
|
?int |
$width = null , |
|
|
?int |
$height = null |
|
) |
| |
Definition at line 165 of file LegacyImages.php.
171 : string {
172 $converter = $this->image_converters->convertToFormat(
174 $output_format,
175 $width,
176 $height
177 );
178 return $this->
storeStream($converter, $path_to_output);
179 }
buildStream(string $path_to_original)
storeStream(ImageConverter $converter, string $path)
◆ croppedSquare()
ILIAS\Filesystem\Util\Convert\LegacyImages::croppedSquare |
( |
string |
$path_to_original, |
|
|
string |
$path_to_output, |
|
|
int |
$square_size, |
|
|
string |
$output_format = ImageOutputOptions::FORMAT_KEEP , |
|
|
int |
$image_quality = 75 |
|
) |
| |
- Returns
- string path to the thumbnail
- Deprecated:
- Use \ILIAS\Filesystem\Util\Convert\Images::croppedSquare() instead.
Definition at line 74 of file LegacyImages.php.
80 : string {
81 $converter = $this->image_converters->croppedSquare(
83 $square_size,
84 $this->output_options
85 ->withQuality($image_quality)
86 ->withFormat($output_format)
87 );
88
89 return $this->
storeStream($converter, $path_to_output);
90 }
◆ resizeByHeight()
ILIAS\Filesystem\Util\Convert\LegacyImages::resizeByHeight |
( |
string |
$path_to_original, |
|
|
string |
$path_to_output, |
|
|
int |
$height, |
|
|
string |
$output_format = ImageOutputOptions::FORMAT_KEEP , |
|
|
int |
$image_quality = 60 |
|
) |
| |
- Deprecated:
- Use \ILIAS\Filesystem\Util\Convert\Images::resizeByHeight() instead.
- Returns
- string path to the resized image
Definition at line 122 of file LegacyImages.php.
128 : string {
129 $converter = $this->image_converters->resizeByHeight(
131 $height,
132 $this->output_options
133 ->withQuality($image_quality)
134 ->withFormat($output_format)
135 );
136 return $this->
storeStream($converter, $path_to_output);
137 }
◆ resizeByWidth()
ILIAS\Filesystem\Util\Convert\LegacyImages::resizeByWidth |
( |
string |
$path_to_original, |
|
|
string |
$path_to_output, |
|
|
int |
$width, |
|
|
string |
$output_format = ImageOutputOptions::FORMAT_KEEP , |
|
|
int |
$image_quality = 60 |
|
) |
| |
- Returns
- string path to the thumbnail
- Deprecated:
- Use \ILIAS\Filesystem\Util\Convert\Images::resizeByWidth() instead.
Definition at line 100 of file LegacyImages.php.
106 : string {
107 $converter = $this->image_converters->resizeByWidth(
109 $width,
110 $this->output_options
111 ->withQuality($image_quality)
112 ->withFormat($output_format)
113 );
114 return $this->
storeStream($converter, $path_to_output);
115 }
◆ resizeToFixedSize()
ILIAS\Filesystem\Util\Convert\LegacyImages::resizeToFixedSize |
( |
string |
$path_to_original, |
|
|
string |
$path_to_output, |
|
|
int |
$width, |
|
|
int |
$height, |
|
|
bool |
$crop_if_true_and_resize_if_false = true , |
|
|
string |
$output_format = ImageOutputOptions::FORMAT_KEEP , |
|
|
int |
$image_quality = 60 |
|
) |
| |
- Returns
- string path to the thumbnail
- Deprecated:
- Use \ILIAS\Filesystem\Util\Convert\Images::resizeToFixedSize() instead.
Definition at line 144 of file LegacyImages.php.
152 : string {
153 $converter = $this->image_converters->resizeToFixedSize(
155 $width,
156 $height,
157 $crop_if_true_and_resize_if_false,
158 $this->output_options
159 ->withQuality($image_quality)
160 ->withFormat($output_format)
161 );
162 return $this->
storeStream($converter, $path_to_output);
163 }
◆ storeStream()
ILIAS\Filesystem\Util\Convert\LegacyImages::storeStream |
( |
ImageConverter |
$converter, |
|
|
string |
$path |
|
) |
| |
|
private |
◆ thumbnail()
ILIAS\Filesystem\Util\Convert\LegacyImages::thumbnail |
( |
string |
$path_to_original, |
|
|
string |
$path_to_output, |
|
|
int |
$fit_into_size, |
|
|
string |
$output_format = ImageOutputOptions::FORMAT_KEEP , |
|
|
int |
$image_quality = 75 |
|
) |
| |
- Returns
- string path to the thumbnail
- Deprecated:
- Use \ILIAS\Filesystem\Util\Convert\Images::thumbnail() instead.
Definition at line 49 of file LegacyImages.php.
55 : string {
56 $converter = $this->image_converters->thumbnail(
58 $fit_into_size,
59 $this->output_options
60 ->withQuality($image_quality)
61 ->withFormat($output_format)
62 );
63 return $this->
storeStream($converter, $path_to_output);
64 }
◆ $image_converters
Images ILIAS\Filesystem\Util\Convert\LegacyImages::$image_converters |
|
private |
◆ $output_options
The documentation for this class was generated from the following file: