Gidday,
Not sure if this is best suited for the devel list or the user list, but
here goes.:
Antialiasing is a basic requirement for generating professional-quality
pictures. Unfortunately the php-gd function imageantialias needs work.
Only a small subset of drawing primitives currently make use of
antialiasing.
See http://www.php.net/manual/en/function.imageantialias.php
To quote, "This function is currently not documented; only the argument
list is available." So there is no documented expected behaviour for
imageantialias. The only hint of what it can and can't do is in a
user-contributed comment on the same page (provided by Yours Truly).
Yet at least one bug report http://bugs.php.net/bug.php?id=24798 has
been marked as 'bogus', although it is at worst is a reasonable feature
request if not a bug.
Actually I propose a new method for antialiasing:
bool imageantialias ( resource im, bool on, int MODE )
where MODE is one of:
AA_TRADITIONAL - Perform antialiasing the same way it's done now - that
is to use a different antialiasing function for each primitive, most of
which haven't yet been implemented.
AA_SCALE - Draw the image to an internal buffer at 2x the requested
size, using regular non-antialiased primitives, and downscale the result
to the requested size with bilinear filtering. This produces nice
antialiased images with very little duplication of code across
primitives. Line thickness may need to be doubled to give the right effect.
AA_TEXT - Draw/downsample the image as above, but omit text objects
until after the image has been downsampled. This allows for clearer but
non-antialiased text.
Greg
Greg Trounson wrote:
Actually I propose a new method for antialiasing:
bool imageantialias ( resource im, bool on, int MODE )
where MODE is one of:
AA_TRADITIONAL - Perform antialiasing the same way it's done
now - that is to use a different antialiasing function for
each primitive, most of which haven't yet been implemented.AA_SCALE - Draw the image to an internal buffer at 2x the
requested size, using regular non-antialiased primitives, and
downscale the result to the requested size with bilinear
filtering. This produces nice antialiased images with very
little duplication of code across primitives. Line thickness
may need to be doubled to give the right effect.AA_TEXT - Draw/downsample the image as above, but omit text
objects until after the image has been downsampled. This
allows for clearer but non-antialiased text.
Ugh. Painful short-term remedies...
I understand the frustration, but given the excellent progress made
lately on GD, both by Boutell-folk and the internal GD maintainer(s),
IMHO I think it'd be better to wait until GD handles anti-aliasing
properly.
Best,
Mike Robinson