[Wolves] Prob with thumbnail create

Wayne Morris wayne at machx.co.uk
Fri May 6 13:17:28 BST 2005


Wayne Morris wrote:

> I've got a line in one of my php scripts that did work before I moved 
> servers:
>
> copy( $newphoto[ $i ], "{$IMAGE_DIR}/{$photoid}.jpg" );
> makeThumb( $newphoto[ $i ], "{$IMAGE_DIR}/thumb/{$photoid}.jpg" );
>
> Now I get the photo in the image directory, but not the thumb in the 
> thumb directory.
> Permissions for thumb seem ok, so I guess its the makeThumb routine.
> Where can I start to debug it?
>
The makeThumb function called is this:

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 );
    }







More information about the Wolves mailing list