image quality (using GD library)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I use GD library to generate images from photographs, approx this code :
                        $image_dst =
imagecreatetruecolor($this->image_dst_x, $this->image_dst_y);
                        imagecopyresized($image_dst, $image_src, 0, 0, 0, 0,
$this->image_dst_x, $this->image_dst_y, $this->image_src_x,
                        $result = @imagejpeg ($image_dst,

- generated image size is larger than the original photo's one
- generated image quality is rather bad

So I think I'm doing something wrong, but don't know what...
Thanks for any help !

Thanks also for telling me if there is a place (newsgroup) to specifically
discuss about GD library, I didn't find any on Boutell's site.

Re: image quality (using GD library)

"Christophe Cerbourg" wrote

you can view the source code of this script.

bye Daniel

Re: image quality (using GD library)

Quoted text here. Click to load it

thanks !

Re: image quality (using GD library)

Also might try resampling the image.  The file is likely larger because
you save it with 100% quality (even if the original file is only 75%)
which can increase the size dramatically in some cases...

Site Timeline