Skip to content
Extraits de code Groupes Projets
Valider 7fa5015b rédigé par cerdic's avatar cerdic Validation de marcimat
Parcourir les fichiers

fix: dans la fonction `image_recadre_avec_fallback()` commencer par un...

fix: dans la fonction `image_recadre_avec_fallback()` commencer par un `image_passe_partout()` pour prendre en compte l'exif de rotation avant un recadre, c'est plus efficace pour un même rendu

Refs: #5925
parent eadf7787
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -505,10 +505,11 @@ function image_recadre_avec_fallback( ...@@ -505,10 +505,11 @@ function image_recadre_avec_fallback(
$position = 'focus', $position = 'focus',
$background_color = 'white' $background_color = 'white'
) { ) {
$im = image_passe_partout($im, $width, $height);
if (function_exists('image_recadre') && ($GLOBALS['meta']['image_process'] ?? '') === 'gd2') { if (function_exists('image_recadre') && ($GLOBALS['meta']['image_process'] ?? '') === 'gd2') {
return image_reduire(image_recadre($im, $width . ':' . $height, '-', $position, $background_color), $width, $height); $im = image_recadre($im, $width . ':' . $height, '-', $position, $background_color);
} else { return image_passe_partout($im, $width, $height);
} }
return $im;
} }
/** /**
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter