Dear All,,
I built a little photo management tool. But I am fighting with the quality of the output quality. I have set the quality of imagejpeg to 100, and still I get striping in the output file. Does anybody have a solution to this? See pic: 
Since the script is running on rented webspace, filesize reduction is a must.
Thx,
Jelle.
The size-reduction script:
function resizeImage($infile, $uitfile, $outputpath)
{
$new_width = 330;
$quality = 100;
$original_picture = $infile;
$new_picture = $outputpath.$uitfile;
$fullPath = $original_picture;
// ****************** Test variables / files for correct input *******************************
if ( !file_exists ( $fullPath )) // Check wether filesource exists
{
die("File doesn't exist!");
}
if( file_exists($new_picture)) // Remove existsing file
{
$delete = @unlink($new_picture);
}
// ***************** Get file details **************************
$size = GetImageSize($fullPath);
$aspectRat = (float)($size[1] / $size[0]);
// ***************** Calculate new x/y size, maintaining original aspect ratio
if($size[0] <= $new_width)
{
return;
}
else
{
$newY = $new_width * $aspectRat;
$newX = $new_width;
}
//create the destination image resource.
$destImg = ImageCreateTrueColor($newX, $newY );
//read the source image (original), use correct function depending on format
if ($size[2] == 1)
{
$sourceImg = ImageCreateFromGIF($fullPath);
}
if ($size[2] == 2)
{
$sourceImg = ImageCreateFromJPEG($fullPath);
}
else if ($size[2] == 3)
{
$sourceImg = ImageCreateFromPNG($fullPath);
}
else
{
die("Dit bestand kan niet gebruikt worden. het is geen JPG, GIF of PNG bestand.<br>"); // can't read pic because of incompatible format
}
// **************************** Create the new output file *******************
ImageCopyResized($destImg, $sourceImg, 0,0,0,0, $newX, $newY, $size[0], $size[1]);
imagejpeg($destImg, $new_picture, $quality);
// *************************** Remove the temproary file *********************
$deletedfile = @unlink($original_picture);
} // End of function resize image