diff --git a/ecrire/inc/filtres_images_mini.php b/ecrire/inc/filtres_images_mini.php index 5792260c26617c83f27d9c45538ee7370ae2d930..05164aed46d53e969ca173a7ca02fe7786976cdf 100644 --- a/ecrire/inc/filtres_images_mini.php +++ b/ecrire/inc/filtres_images_mini.php @@ -505,10 +505,11 @@ function image_recadre_avec_fallback( $position = 'focus', $background_color = 'white' ) { + $im = image_passe_partout($im, $width, $height); if (function_exists('image_recadre') && ($GLOBALS['meta']['image_process'] ?? '') === 'gd2') { - return image_reduire(image_recadre($im, $width . ':' . $height, '-', $position, $background_color), $width, $height); - } else { return image_passe_partout($im, $width, $height); + $im = image_recadre($im, $width . ':' . $height, '-', $position, $background_color); } + return $im; } /**