Re: [GD-DEVEL] Color bug in JPEG output with 2.0.36
| From: | Ethan A Merritt | Date: | Sun, 30 Mar 2008 17:50:29 +0000 |
| Subject: | Re: [GD-DEVEL] Color bug in JPEG output with 2.0.36 | ||
| References: | 1 2 3 | Groups: | php.gd.devel |
| Request: | Send a blank email to php-gd-devel+get-405@lists.php.net to get a copy of this message | ||
On Sunday 30 March 2008 08:50, Pierre Joye wrote:
> On Sun, Mar 30, 2008 at 11:48 AM, Pierre Joye <pierre.php@gmail.com> wrote:
> > Hi Ethan!
> >
> I figured out the source of the "brown" red and posted the explanation in:
>
>
> http://sourceforge.net/tracker/index.php?func=detail&aid=1929002&group_id=2055&atid=102055
Right. However there is still a bit of a mystery.
The following set of commands demonstrates that the quality setting of the
jpeg compression is critical:
echo "set term png; test" | gnuplot > test.png
convert -quality 88 test.png test88.jpeg
convert -quality 90 test.png test90.jpeg
The first conversion shows the red->muddy brown artifact.
The second does not.
However, the gnuplot gd.trm already sets the jpeg quality setting to 90,
yet the color artifact still occurs. Is there a difference between what
ImageMagick thinks is "quality 90" and what libgd thinks?
JPEG_text()
{
int quality = 90;
image_do_crop();
if (png_state.flags & PNG_USE_INTERLACE)
gdImageInterlace(png_state.image, 1);
gdImageJpeg(png_state.image, gpoutfile, quality);
gdImageDestroy(png_state.image);
}
--
Ethan A Merritt