I use the following simple script to resize large images (typically 4000x4000 pixels and up). After upgrading to PHP 4.06, and the GD- Library bundled with that release, the result images become either yellow or black (seems to be dependant on what kind of image), when the source image is wider than 2048 pixels. <?php $size = getImageSize($imgfile); if ((!$x)|| (!$y)) { $x = $size[0]; $y = $size[1]; } switch ($size[2]) { case 2: $in_img = ImageCreateFromJpeg($imgfile); $out_format = 1; break; case 3: $in_img = ImageCreateFromPng($imgfile); $out_format = 2; break; default: die("File is not jpg or png. Terminating"); } $out_img = ImageCreate($x,$y); $color = ImageColorAllocate($out_img,255,255,255); imagecolortransparent($out_img, $color); ImageCopyResized($out_img, $in_img, 0, 0, 0, 0, $x, $y, $size[0], $size[1]); switch ($out_format) { case 1: header ("Content-type: image/jpeg"); ImageJPEG($out_img); case 2: header ("Content-type: image/png"); ImagePNG($out_img); default: die("should never happen"); } ?> I am wondering whether there is something wrong with my script, or with GD-library. I am running Apache 1.3.20r2 and PHP4.06 on Windows 2000 Professional -- Arve «The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.» - Winston Churchill http://www.bersvendsen.com/ -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]