[Wolves] Prob with thumbnail create
Stuart Langridge
stuart.langridge at gmail.com
Fri May 6 13:37:14 BST 2005
> > 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 );
> }
It doesn't throw any errors? Have you turned off error reporting?
Aq.
More information about the Wolves
mailing list