|
Posted by Dennis de Wit on 07/24/06 09:53
dimo414 wrote:
> I have the following script to take an image in the 'img' directory,
> and create a thumbnail version in the 'thumb' directory.
>
> $image =
> imagecreatefrompng('../galleries/'.$gallery.'/img/'.$fileid.'.'.$type);
> $image_p = imagecreatetruecolor($width, $height);
> imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height,
> $width_orig, $height_orig);
> imagepng($image_p,
> '../galleries/'.$gallery.'/thumb/'.$fileid.'.'.$type);
>
> The image file was previously saved sucessfully as $fileid.'.'.$type,
> all the widths/heights are previously defined, as is $gallery. There
> is no eror message output when the script concludes, and yet the image
> has not been created in 'thumb'; or anywhere else, as far as I can
> tell.
>
> It's some kind of logic issue, but I just can't figure it out.
>
Do you have error reporting on? Use error_reporting(E_ALL); to see all
errors that can occur here. Also check whether or not your php
installation has access to the thumb directory.
Check whether it would give an error message when you change the path
(change thumb into thumbiethumb, or something smaller :-D) Perhaps it's
indeed placing the file somewhere different from where you would expect
it to be placed
Dennis
[Back to original message]
|