[Wolves] Prob with thumbnail create
Wayne Morris
wayne at machx.co.uk
Fri May 6 13:48:13 BST 2005
Stuart Langridge 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 );
>> }
>>
>>
>
>It doesn't throw any errors? Have you turned off error reporting?
>
>Aq.
>
>
>
Err, where do you turn it ON ;-)
As it is the scripts run ok (its a photogallery type thingy), the links
to the alleged thumbnail are in the right place (but obv with a 'broken'
image as a place holder),
and click on link and you get the big image, no errors shown on
displayed pages.
More information about the Wolves
mailing list