
Originally Posted by
noddy
take a look and give me a guess what it might be caused by
But is your code setup to use gd 2.0?
PHP Code:
// Build Thumbnail with GD 2.0
$function_suffix = $gd_function_suffix[$filetype];
$function_to_read = 'ImageCreateFrom' . $function_suffix;
$function_to_write = 'Image' . $function_suffix;
// Read the source file
$source_handle = $function_to_read($images_dir . '/' . $filename);
if ($source_handle) {
// Let's create a blank image for the thumbnail
$destination_handle = ImageCreateTrueColor ($thumbnail_width, $thumbnail_height);
// Now we resize it
ImageCopyResampled($destination_handle, $source_handle, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $size[0], $size[1]);
}
// Let's save the thumbnail
$function_to_write($destination_handle, $images_dir . '/tb_' . $filename);
Bookmarks