i just moved to a new server and i'm having some problems now resizing jpegs... i'm using the same code on both servers, but on a new server, the resulting jpeg image is all washed out and very bright.
here is my resize code:
global $extra_item_image_root, $new_photo;
$item_id = eregi_replace("[^0-9]","",$HTTP_POST_VARS["item_id"]);
if($new_photo != 'none') {
$array = getimagesize($new_photo);
$original_width = $array[0];
$original_height = $array[1];
$im = 0;
if($array[2] == 2) $im = ImageCreateFromJpeg($new_photo);
if($im) {
if($original_width > $original_height) {
$thumbnail_height = floor((250 * $original_height) / $original_width);
$thumbnail_width = 250;
} else {
$thumbnail_width = floor((250 * $original_width) / $original_height);
$thumbnail_height = 250;
}
$thumbnail = imagecreate($thumbnail_width, $thumbnail_height);
imagecopyresized($thumbnail, $im, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $original_width, $original_height);
imagejpeg($im, $extra_item_image_root.$item_id.".jpg");
imagejpeg($thumbnail, $extra_item_image_root.$item_id."_small.jpg");
}
}
this is from my php info page:
gd
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled
has anyone seen this problem? how can i solve it?