Corrige la génération des miniatures au format avif et webp
This commit is contained in:
parent
c745711a2e
commit
87b763ddae
@ -1,5 +1,10 @@
|
|||||||
# Notes de mises à jour
|
# Notes de mises à jour
|
||||||
|
|
||||||
|
## Versions 13.3.05
|
||||||
|
** Correction : **
|
||||||
|
- Corrige la génération des miniatures au format avif et webp
|
||||||
|
|
||||||
|
|
||||||
## Versions 13.3.04
|
## Versions 13.3.04
|
||||||
|
|
||||||
** Correction : **
|
** Correction : **
|
||||||
|
@ -51,7 +51,7 @@ class common
|
|||||||
const ACCESS_TIMER = 1800;
|
const ACCESS_TIMER = 1800;
|
||||||
|
|
||||||
// Numéro de version
|
// Numéro de version
|
||||||
const ZWII_VERSION = '13.3.04';
|
const ZWII_VERSION = '13.3.05';
|
||||||
|
|
||||||
// URL autoupdate
|
// URL autoupdate
|
||||||
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/cms-update/raw/branch/master/';
|
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/cms-update/raw/branch/master/';
|
||||||
@ -1217,11 +1217,10 @@ class common
|
|||||||
$source_image = imagecreatefromwebp($src);
|
$source_image = imagecreatefromwebp($src);
|
||||||
break;
|
break;
|
||||||
case 'avif':
|
case 'avif':
|
||||||
$source_image = function_exists('imagecreatefromavif') ? imagecreatefromavif($src) : null;
|
$source_image = imagecreatefromavif($src);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
// Image valide
|
// Image valide
|
||||||
if ($source_image) {
|
if (is_object($source_image)) {
|
||||||
$width = imagesx($source_image);
|
$width = imagesx($source_image);
|
||||||
$height = imagesy($source_image);
|
$height = imagesy($source_image);
|
||||||
/* find the "desired height" of this thumbnail, relative to the desired width */
|
/* find the "desired height" of this thumbnail, relative to the desired width */
|
||||||
@ -1238,9 +1237,9 @@ class common
|
|||||||
return (imagepng($virtual_image, $dest));
|
return (imagepng($virtual_image, $dest));
|
||||||
case 'image/gif':
|
case 'image/gif':
|
||||||
return (imagegif($virtual_image, $dest));
|
return (imagegif($virtual_image, $dest));
|
||||||
case 'webp':
|
case 'image/webp':
|
||||||
return (imagewebp($virtual_image, $dest));
|
return (imagewebp($virtual_image, $dest));
|
||||||
case 'avif':
|
case 'image/avif':
|
||||||
return (imageavif($virtual_image, $dest));
|
return (imageavif($virtual_image, $dest));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user