Ciao sto utilizzando questo codice per ridimensionare delle immagini:
<?php
$maxx = $_GET["maxx"];
$maxy = $_GET["maxy"];
$source_image_URL = $_GET["src"];
$ext = array_pop(explode(".", $source_image_URL));
$source_image = imagecreatefromjpeg($source_image_URL);
list($width, $height) = getimagesize($source_image_URL);
$percent1 = $width / $maxx;
$percent2 = $height / $maxy;
$percent = max($percent1,$percent2);
$new_eight = round($height /$percent);
$new_width = round($width /$percent);
$dest_image = imagecreatetruecolor($new_width, $new_eight);
imagecopyresampled ($dest_image, $source_image, 0, 0, 0, 0, $new_width, $new_eight, $width, $height);
header("Content-type: image/jpeg");
imagejpeg($dest_image);
imagedestroy($dest_image);
imagedestroy($source_image); ?>
la domanda è
perchè se utilizzo un immagine funzione perfettamente mentre se lo inserisco all'interno di un ciclo while mi sballa tutta la pagina e adirittura alle volte, (per esempio ho 10 immagini), mi visualiza tre,alle volte 7 perchè?