19 declare(strict_types=1);
    25     public function rebuildThumbnails(
    31         if (!$is_single_line || $thumbnail_size === 0) {
    35         foreach ($answers as $answer) {
    36             if ($answer->getImage() === 
'') {
    40             $thumb_path = $image_path . $this->getThumbPrefix() . $answer->getImage();
    41             if (file_exists($thumb_path)) {
    45             $current_file_path = $image_path . $answer->getImage();
    46             if (!file_exists($current_file_path)) {
    49             $new_file_name = $this->buildHashedImageFilename($answer->getImage(), 
true);
    50             $new_file_path = $image_path . $new_file_name;
    51             rename($current_file_path, $new_file_path);
    52             $answer->setImage($new_file_name);
    54             $this->generateThumbForFile(
    64     public function getThumbPrefix(): string
    69     public function generateThumbForFile(
    74         $file_path = $image_path . $file_name;
    75         if (!file_exists($file_path)) {
    79         $thumb_path = $image_path . $this->getThumbPrefix() . $file_name;
    80         $path_info = pathinfo($file_path);
    82         switch (strtoupper($path_info[
'extension'])) {
 
static convertImage(string $a_from, string $a_to, string $a_target_format="", string $a_geometry="", string $a_background_color="")
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...