Background:
My host has updated the GD-library to version GD 2.0.12 (earlier version was 1.6.2 or 1.8).
Phpinfo:
PHP Version 4.3.2
GD Support enabled
GD Version bundled (2.0.12 compatible)
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
The problem:
With the older version of GD, i was able to upload images, making thumbs of all the pictures
(JPEG) and link the thumbs to the mainpicture.
This still works, but THE COLORS OF THE THUMB BECOME GREY. You can still see what the thumbs
are showing, but with a grey "layer" over...
The code:
In my mainfile:
makeThumb( $newphoto[ $i ], "{$IMAGE_DIR}/thumb/{$photoid}.jpg" );
The function itself:
function makeThumb( $scrFile, $dstFile, $dstW=120, $dstH=100 )
{
$im = ImageCreateFromJPEG( $scrFile );
$srcW = ImageSX( $im );
$srcH = ImageSY( $im );
$ni = ImageCreate( $dstW, $dstH );
ImageCopyResized( $ni, $im, 0, 0, 0, 0, $dstW, $dstH, $srcW, $srcH );
ImageJPEG( $ni, $dstFile );
}
Can someone help me??
Levi