Bonjour,

j'ai cette fonction qui upload mes image jpeg nikel mais png rien ne s'upload dans mon dossier:
fonction:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
private function save_thumb_image($thumb, $path, $quality){
          switch(self::get_image_extension($path)){
              case 'gif':
                   imagegif($thumb, $path);
              break;
              case 'png':
                   imagepng($thumb, $path);
              break;
              case 'jpeg':
              case 'jpg':
              case 'jfif':
              case 'jpe':
              default :
                   imagejpeg($thumb, $path, $quality); 
              break;
          } 
       }
appel de la fonction :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
$NomImageFinalMedium= $FILES['name'];
 
 
							if(isset($_FILES['fichier']['name'])){
								$source_image_extension = thumbs::get_image_extension($_FILES['fichier']['name']);
								print_r($source_image_extension);
								$source_image_path = '../../organisateur/avatar/background.'.$source_image_extension;
 
								if(move_uploaded_file($_FILES['fichier']['tmp_name'], $source_image_path)){
 
									$thumbs_saving_path_Medium = '../../organisateur/avatar/'.$pseudo_membre.'/';
 
									$thumbs_image_quality = 100;
									/*creation miniature Medium (80*80)*/
									$tbMedium = new thumbs($source_image_path, $thumbs_saving_path_Medium, $thumbs_image_quality);
									$tbMedium->resize(180,180,"FFFFFF",$NomImageFinalMedium.'');
 
 
 
									unlink($source_image_path);
								}
							}
							else
							{
								echo 'Le dossier n existe pas.';
							}
merci.