I'm currently setting JPEG quality to 85%, hence the large file sizes.
Normally, I'd be looking for better quality and file sizes about 70% of
their current size.  Some of the originals are scanned directly from the
painting, which yields very high quality, some are taken with a digital
camera (I could live with poorer quality on these).

I'm using some functions I found in 'PHP and MySQL web development' with
some modifications, so JPEGs are generated from uploaded files and stored on
the server through an HTML form interface.  Here's the core bit of the code:

$src = ImageCreateFromJPEG($image);
$dst = ImageCreate($tn_width,$tn_height);
ImageCopyResized($dst, $src, 0, 0, 0, 0,
$tn_width,$tn_height,$width,$height);
ImageJpeg($dst, $path, $compression); //compression set to 85 here.
ImageDestroy($src);
ImageDestroy($dst);

Mick


-----Original Message-----
From: Andrew Brampton [mailto:[EMAIL PROTECTED]]
Sent: 15 April 2002 17:56
To: Sear, Mick; [EMAIL PROTECTED]
Subject: Re: [PHP] Poor results with GD


They looked ok to me, but I don't know what the orginals looked like.

But the problem might be that your JPeg quality is set lower than you would
like. You can increase it be setting a parameter in ImageJPEG() or most
likly whatever function you are using

Andrew
----- Original Message -----
From: "Sear, Mick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 15, 2002 4:32 PM
Subject: [PHP] Poor results with GD


> Not sure if anyone else uses GD much, but I've been experimenting with it
> and PHP recently and I've found I get large file sizes and very 'aliased'
> graphics.
>
> Can anyone suggest a fix/ alternative?
>
> You'll see what I mean if you look at www.msear.com/paintings/ where the
> images are currently all generated with GD (but not for long, I think!)
>
> Cheers,
> Mick
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

Reply via email to