[cl-gd-devel] Antialiased lines, arcs ... don't work, even the test orig pic is wrong...
Hi I am using CL-GD for over a week now and found out that the antialiasing doesn't work at all... The test, I think was number 4, produces the same result as its orig picture in the orig folder, but the orig picture in the orig folder is also wrong - there's no antialiasing in it... And this orig pic comes from the package itself... The picture on the web though is correct here http://www.weitz.de/cl-gd/ the pic's name: is anti-aliased-lines.png I tested this with AlegroCL and CLISP both under windows... with the same results... Is this a bug? Thanks for the help arry __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Hi! On Thu, 3 Nov 2005 05:38:09 -0800 (PST), arry <frinkofox@yahoo.com> wrote:
I am using CL-GD for over a week now and found out that the antialiasing doesn't work at all... The test, I think was number 4, produces the same result as its orig picture in the orig folder, but the orig picture in the orig folder is also wrong - there's no antialiasing in it... And this orig pic comes from the package itself...
Is this a bug?
Here's the equivalent C code: #include "gd.h" int main () { gdImagePtr im; FILE *out; int orange, white, red; im = gdImageCreate(150, 50); orange = gdImageColorAllocate(im, 255, 165, 0); white = gdImageColorAllocate(im, 255, 255, 255); red = gdImageColorAllocate(im, 255, 0, 0); gdImageFilledRectangle(im, 50, 0, 99, 49, white); gdImageSetThickness(im, 2); gdImageLine(im, 5, 10, 145, 10, red); gdImageSetAntiAliased(im, red); gdImageLine(im, 5, 25, 145, 25, gdAntiAliased); gdImageSetAntiAliasedDontBlend(im, red, orange); gdImageLine(im, 5, 40, 145, 40, gdAntiAliased); out = fopen("/tmp/test.png", "w"); gdImagePngEx(im, out, 3); fclose(out); gdImageDestroy(im); } If I run this on my Debian system (with GD being 2.0.33) then diff says the result is identical to the image produced by CL-GD. (Note that the GD documentation for gdImageSetAntiAliasedDontBlend's signature is wrong, BTW.) I just re-checked the GD docs and there I find this: Drastically faster, less memory-intensive antialiased drawing, thanks to Pierre-Alain Joye. This code was imported from the PHP "fork" of gd. The API for antialiased drawing has not changed, however the implementation has been completely replaced. Antialiased line drawing does not support widths other than 1, however this did not work properly with the other implementation of antialiasing either. Aha, so this once (kind of) worked in the GD versions I started with and ceased to work in the meantime. I should probably change the test and the examples. Cheers, Edi.
On Fri, 04 Nov 2005 02:01:08 +0100, Edi Weitz <edi@agharta.de> wrote:
I should probably change the test and the examples.
But I have to admit that I don't know how. I can't seem to find a simple example using gdImageLine where one can really see the effect of anti-aliasing. If someone on this list has a nice example to replace the one in the docs (and the test suite) please send it. Thanks, Edi.
Does anybody know whether antialiasing works at all in gd ? Edi, do you keep this old version of cl-gd or gd where antialiasing still worked? or the .dll file for windows also... Everything is jagged without antialiasing, not beautiful, can't draw anything in a proper manner... all the best arry --- Edi Weitz <edi@agharta.de> wrote:
On Fri, 04 Nov 2005 02:01:08 +0100, Edi Weitz <edi@agharta.de> wrote:
I should probably change the test and the examples.
But I have to admit that I don't know how. I can't seem to find a simple example using gdImageLine where one can really see the effect of anti-aliasing. If someone on this list has a nice example to replace the one in the docs (and the test suite) please send it.
Thanks, Edi.
__________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
On Thu, 10 Nov 2005 04:54:50 -0800 (PST), arry <frinkofox@yahoo.com> wrote:
Does anybody know whether antialiasing works at all in gd ?
I think you should try with a simple C program and ask the GD maintainers. This doesn't seem to be a CL-GD issue I'm afraid.
Edi, do you keep this old version of cl-gd or gd where antialiasing still worked? or the .dll file for windows also...
No, sorry, unfortunately not. Cheers, Edi.
participants (2)
-
arry -
Edi Weitz