On Tue, August 15, 2006 6:31 am, chris smith wrote:
> imagedestroy($target_id);
> imagedestroy($source_id);
>
> just before
>
> imagejpeg ($target_id,"$targetfile",$jpegqual);
> return true;
> }

If you destroy it before you write it to disk, you gonna get garbage
for your disk JPEG.

destroy $target_id *AFTER* you imagejpeg() it.

Actually, PHP will complain if you try to destroy it first and then
use it later, so you won't get the $targetfile to work at all, really.

But if it did "work" it would just be junk, cuz that image ain't in
RAM no more.

PS
Using "$targetfile" is just silly.

$targetfile is already a string.

Putting quotes around it just makes PHP build a new string with the
same contents again, which is, well, silly.

PHP might even optimize that away, it's so silly, but I'd recommend
just leaving the excessive quotes off in the first place.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to