Merci pour ta réponse améthyste.
En effet $_FILES'...'] est un array...et je n'avais pas réfléchi que le traitement pourrait être différent pour IMAGINE de celui qu'on peut faire pour traiter des images "uploadées", comme celle ci-dessous que j'utilisais couramment:
<?php
function create_event_thumb_pix($original_file,$thumbnail,$function_suffix,$pix_max_width,$pix_max_height) {
$size = GetImageSize( $original_file );
/*echo "width: ".$size[0]." height : ".$size[1]."<br>";*/
if($size[0] > $size[1]) {
$thumbnail_width = $pix_max_width;
$thumbnail_height = (int)($size[1] * ($pix_max_width / $size[0]));
} else {
$thumbnail_width = (int)($size[0] * ($pix_max_height / $size[1]));
$thumbnail_height = $pix_max_height;
}
// Build Thumbnail with GD 2.x, you can use the other described methods too
$function_to_read = "ImageCreateFrom".$function_suffix;
$function_to_write = "Image".$function_suffix;
// Read the source file
$source_handle = $function_to_read ( $original_file );
if($source_handle){
// Let's create an blank image for the thumbnail w/GD 2
$destination_handle = ImageCreateTrueColor($thumbnail_width, $thumbnail_height );
// Now we resize it w/GD 2
ImageCopyResampled( $destination_handle, $source_handle, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $size[0], $size[1] );
}
// Let's save the thumbnail
$function_to_write( $destination_handle, $thumbnail );
}
?>
Bref, je vais retraiter le tableau $_FILES'...'], pour en tirer le chemin, le nom du fichier provisoire, etc...pour pouvoir traiter l'image ...finalement.
Je posterais ma solution pour revue et commentaires, et je taggerais le sujet "clos" à ce moment là ...
Merci !
Cdt,
JMB