Changeset 90040 in spip-zone
- Timestamp:
- Jun 9, 2015, 12:34:22 PM (6 years ago)
- Location:
- _plugins_/image_responsive
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/image_responsive/action/image_responsive.php
r89276 r90040 3 3 4 4 function action_image_responsive() { 5 6 5 $img = _request("img"); 7 6 $taille = _request("taille"); … … 10 9 11 10 retour_image_responsive($img, $taille, $dpr, $xsendfile, "http"); 12 13 11 } 14 15 ?> -
_plugins_/image_responsive/image_responsive_fonctions.php
r89758 r90040 499 499 $largeur = $l_img; 500 500 $hauteur = $h_img; 501 502 } 503 504 501 } 502 503 505 504 if ($l_img == 0 OR $h_img == 0) return $img; 506 505 507 $r_img = $h_img / $l_img; 508 $r = $hauteur / $largeur; 506 $r_img = $h_img / $l_img; 507 $r = $hauteur / $largeur; 509 508 510 509 if ($r_img < $r) { … … 515 514 $h_dest = $l_img*$r; 516 515 } 517 518 516 517 519 518 // Si align est "focus", on va aller chercher le «point d'intérêt» de l'image 520 519 // avec la fonction centre_image du plugin «centre_image» 521 if ($align == "focus" && function_exists( centre_image)) {520 if ($align == "focus" && function_exists('centre_image')) { 522 521 $dx = centre_image_x($img); 523 522 $dy = centre_image_y($img); … … 576 575 577 576 578 579 ?>
Note: See TracChangeset
for help on using the changeset viewer.