Overview
Artifact ID: | 082926aae35db7e40c52184fe36d724cba8578d8 |
---|---|
Ticket: | 8aff41aff62f105b72499b3e39d9221f620dc23f
erreur lors de l'enregistrement de "Image de fond" |
User & Date: | damientanche on 2020-11-22 14:25:26 |
Changes
- foundin changed to: "1.0.0-beta6"
- icomment:
bonjour, je sélectionne l'image jpg ou png en format nb de moins 380x200 on voit l'apercu et lorsque je fait enregistrer j'ai l'erreur suivante ----------------------------- Une erreur s'est produite RuntimeException No suitable image library found for type: image/png in .../include/lib/KD2/Graphics/Image.php:209 205 } 206 207 if (!$library) 208 { 209 throw new \RuntimeException('No suitable image library found for type: ' . $this->type); 210 } 211 } 212 213 $this->library = $library; in .../include/lib/KD2/Graphics/Image.php:258 → KD2\Graphics\Image->init (2 arg.) $info array(6) { [0]=> int(343) [1]=> int(200) [2]=> int(3) [3]=> string(24) "width="343" height="200"" ["bits"]=> int(8) ["mime"]=> string(9) "image/png" } $library NULL 254 throw new \RuntimeException('Invalid image format, couldn\'t be read: from string'); 255 } 256 257 $obj->blob = $blob; 258 $obj->init($info, $library); 259 260 self::$init = false; 261 262 return $obj; in .../include/lib/Garradin/Fichiers.php:571 → KD2\Graphics\Image::createFromBlob (1 arg.) $blob 567 if ($path && !$content) { 568 $i = new Image($path); 569 } 570 else { 571 $i = Image::createFromBlob($content); 572 } 573 574 // Recompress PNG files from base64, assuming they are coming 575 // from JS canvas which doesn't know how to gzip (d'oh!) in .../include/lib/Garradin/Fichiers.php:524 → Garradin\Fichiers::storeFile (3 arg.) $name string(14) "image_fond.png" $path NULL $content 520 */ 521 static public function storeFromBase64($name, $content) 522 { 523 $content = base64_decode($content); 524 return self::storeFile($name, null, $content); 525 } 526 527 /** 528 * Upload de fichier (interne) in .../include/lib/Garradin/Config.php:141 → Garradin\Fichiers::storeFromBase64 (2 arg.) $name string(14) "image_fond.png" $content 137 } 138 139 if (strlen($value) > 0) 140 { 141 $f = Fichiers::storeFromBase64($key . '.png', $value); 142 $value = $f->id; 143 unset($f); 144 } 145 } in .../www/admin/config/index.php:39 → Garradin\Config->save (0 arg.) 35 if (trim(f('image_fond')) != '') { 36 $config->set('image_fond', f('image_fond') ?: null); 37 } 38 39 $config->save(); 40 41 Utils::redirect(ADMIN_URL . 'config/?ok'); 42 } 43 catch (UserException $e) Context id bykqb332 date 2020-11-22T14:17:18+01:00 os Linux language PHP 7.4.9 environment development php_sapi cli-server remote_ip 127.0.0.1 http_method POST files_sent array(0) { } rootDirectory /usr/share/garradin garradin_data_root /home/leskeepcool/.local/share/garradin garradin_version 1.0.0-beta6 url http://127.0.0.1:8081/admin/config/
- login: "damientanche"
- mimetype: "text/x-fossil-plain"
- private_contact changed to: "53f1f48b9ec02919a3ca18805156d13a721a6cec"
- severity changed to: "Critical"
- status changed to: "Open"
- title changed to: "erreur lors de l'enregistrement de "Image de fond""
- type changed to: "Code_Defect"