| |
| 01 | | | 02 | | | 03 | | | 04 | | | 05 | | | 06 | | | 07 | | | 08 | | | 09 | | | 10 | | | 11 | | | 12 | | | 13 | | | 14 | | | 15 | | | 16 | | | 17 | | | 18 | | | 19 | | | 20 | | | 21 | | | 22 | | | 23 | | | 24 | | | 25 | | | 26 | | | 27 | | | 28 | |
|
<?php
| /*---------------------------------------------------------------*/
| /*
| Titre : Symétrie horizontale
|
| URL : https://phpsources.net/code_s.php?id=982
| Date édition : 15 Fév 2019
| */
| /*---------------------------------------------------------------*/
|
| function image_flip($oldIm){
| $width=imagesx($oldIm);
| $height=imagesy($oldIm);
| $newIm=imagecreate($width, $height);
|
| for($i=0; $i<$width; $i++)
| {
| for($j=0;$j<$height;$j++)
| {
| imagecopy($newIm, $oldIm, $i, $j, $i, $height-1-$j, 1, 1);
| }
| }
| return $newIm;
| }
|
| ?>
|
| |
|
|
Fonctions du code - Doc officielle PHP
| php.net |
Description |
Versions PHP |
OUTIL |
| imagecopy | Copie une partie d'une image |
PHP 4, PHP 5, PHP 7, PHP 8
|
|
|
|
| imagecreate | Crée une nouvelle image à palette |
PHP 4, PHP 5, PHP 7, PHP 8
|
|
|
|
| imagesx | Retourne la largeur d'une image |
PHP 4, PHP 5, PHP 7, PHP 8
|
|
|
|
| imagesy | Retourne la hauteur de l'image |
PHP 4, PHP 5, PHP 7, PHP 8
|
|
|
|
| return | Retourne le controle du programme au module appelant. |
PHP 4, PHP 5, PHP 7, PHP 8
|
|
|
|
Dites merci aux auteurs pour leurs travail, ça ne coûte rien et ça fait toujours plaisir