String Tokenizer Flash Componente per Calcolo MD5
Aug 20

La seguente funzione serve e ridimensionare fisicamente un’immagine,
mantenendo le proporzioni della stessa

< ?
 
function resizeToFile ($sourcefile, $dest_x, $dest_y, $targetfile, $jpegqual){
 
/* prende la dimensione dell'immagine da ridimensionare */
 
  picsize=getimagesize("$sourcefile");
 
  $source_x = $picsize[0];
 
  $source_y = $picsize[1];
 
  $source_id = imageCreateFromJPEG("$sourcefile");
 
  $target_id=imagecreate($dest_x, $dest_y);
 
  $target_pic=imagecopyresized($target_id,$source_id,0,0,0,0,$dest_x,$dest_y,
 
  $source_x,$source_y);
 
  imagejpeg ($target_id,"$targetfile",$jpegqual);
 
  return true;
 
}
 
?>

(Nessun voto)
Loading ... Loading ...

Inserisci il tuo Commento:

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a