bhè..io di solito uso un sistema poco tecnologico: paint+righello poggiato sullo schermo :P
ina lternativa puoi usare questo script:
Codice PHP:
<?php
$filename='file.jpg';
list($width, $height, $type) = getimagesize($filename);
switch($type)
{
case 1:
$image = imagecreatefromgif($filename);
break;
case 2:
$image = imagecreatefromjpeg($filename);
break;
case 3:
$image = imagecreatefrompng($filename);
break;
}
$image_p = imagecreatetruecolor(($width/2), $height);
$image_p2 = imagecreatetruecolor(($width/2), $height);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);
imagecopyresampled($image_p2, $image, 0, 0, ($width/2), 0, $width, $height, $width, $height);
imagejpeg($image_p, "1".$filename);
imagejpeg($image_p2, "2".$filename);
?>