From frinkofox at yahoo.com Thu Nov 3 13:38:09 2005 From: frinkofox at yahoo.com (arry) Date: Thu, 3 Nov 2005 05:38:09 -0800 (PST) Subject: [cl-gd-devel] Antialiased lines, arcs ... don't work, even the test orig pic is wrong... Message-ID: <20051103133809.42242.qmail@web54115.mail.yahoo.com> 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 From edi at agharta.de Fri Nov 4 01:28:58 2005 From: edi at agharta.de (Edi Weitz) Date: Fri, 04 Nov 2005 02:28:58 +0100 Subject: [cl-gd-devel] Antialiased lines, arcs ... don't work, even the test orig pic is wrong... In-Reply-To: (Edi Weitz's message of "Fri, 04 Nov 2005 02:01:08 +0100") References: <20051103133809.42242.qmail@web54115.mail.yahoo.com> Message-ID: On Fri, 04 Nov 2005 02:01:08 +0100, Edi Weitz 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. From edi at agharta.de Fri Nov 4 01:01:08 2005 From: edi at agharta.de (Edi Weitz) Date: Fri, 04 Nov 2005 02:01:08 +0100 Subject: [cl-gd-devel] Antialiased lines, arcs ... don't work, even the test orig pic is wrong... In-Reply-To: <20051103133809.42242.qmail@web54115.mail.yahoo.com> (arry's message of "Thu, 3 Nov 2005 05:38:09 -0800 (PST)") References: <20051103133809.42242.qmail@web54115.mail.yahoo.com> Message-ID: Hi! On Thu, 3 Nov 2005 05:38:09 -0800 (PST), arry 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. From frinkofox at yahoo.com Thu Nov 10 12:54:50 2005 From: frinkofox at yahoo.com (arry) Date: Thu, 10 Nov 2005 04:54:50 -0800 (PST) Subject: [cl-gd-devel] Antialiased lines, arcs ... don't work, even the test orig pic is wrong... In-Reply-To: Message-ID: <20051110125450.7323.qmail@web54101.mail.yahoo.com> 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 wrote: > On Fri, 04 Nov 2005 02:01:08 +0100, Edi Weitz 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 From edi at agharta.de Fri Nov 11 22:29:38 2005 From: edi at agharta.de (Edi Weitz) Date: Fri, 11 Nov 2005 23:29:38 +0100 Subject: [cl-gd-devel] Antialiased lines, arcs ... don't work, even the test orig pic is wrong... In-Reply-To: <20051110125450.7323.qmail@web54101.mail.yahoo.com> (arry's message of "Thu, 10 Nov 2005 04:54:50 -0800 (PST)") References: <20051110125450.7323.qmail@web54101.mail.yahoo.com> Message-ID: On Thu, 10 Nov 2005 04:54:50 -0800 (PST), arry 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. From frinkofox at yahoo.com Tue Nov 22 11:54:35 2005 From: frinkofox at yahoo.com (arry) Date: Tue, 22 Nov 2005 03:54:35 -0800 (PST) Subject: [cl-gd-devel] just to share Message-ID: <20051122115435.8412.qmail@web54110.mail.yahoo.com> I just want to share a problem with cl-gd or maybe gd itself i don't know... Has anybody tried to draw an ellipse which starts and ends at a precise angle? Well, I have and it turns out that the angles that i have specified are not drawn exact , they are either bigger or smaller and SOMETIMES theyy are correct! is this a problem with gd or cl-gd? example I draw an ellipse that passes through two points then I want this ellipse to start from exactly one of the two point aand end at the other one. I calculate the angles with tthe help of the function (atan) or (asin) using the coordinates of the center of the ellipse and the two given points... and the angles drawn don't match with the given points That's funny!!! ridiculous!!! There's always 1 or 2 maybe more degrees discrapency between the angles drawn and the given points Anybody encountered the same thing? __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com From edi at agharta.de Tue Nov 22 12:38:51 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 22 Nov 2005 13:38:51 +0100 Subject: [cl-gd-devel] just to share In-Reply-To: <20051122115435.8412.qmail@web54110.mail.yahoo.com> (arry's message of "Tue, 22 Nov 2005 03:54:35 -0800 (PST)") References: <20051122115435.8412.qmail@web54110.mail.yahoo.com> Message-ID: On Tue, 22 Nov 2005 03:54:35 -0800 (PST), arry wrote: > I just want to share a problem with cl-gd or maybe gd itself i don't > know... > > Has anybody tried to draw an ellipse which starts and ends at a > precise angle? Well, I have and it turns out that the angles that i > have specified are not drawn exact , they are either bigger or > smaller and SOMETIMES theyy are correct! > > is this a problem with gd or cl-gd? > > example > I draw an ellipse that passes through two points then I want this > ellipse to start from exactly one of the two point aand end at the > other one. I calculate the angles with tthe help of the function > (atan) or (asin) using the coordinates of the center of the ellipse > and the two given points... > > and the angles drawn don't match with the given points That's > funny!!! ridiculous!!! There's always 1 or 2 maybe more degrees > discrapency between the angles drawn and the given points I don't have time to investigate this at the moment but if in doubt I'd first try with a similar C program to see if the problems are in GD. You also might want to check if any rounding errors occur within CL-GD. Good luck, Edi. From frinkofox at yahoo.com Wed Nov 23 13:32:07 2005 From: frinkofox at yahoo.com (arry) Date: Wed, 23 Nov 2005 05:32:07 -0800 (PST) Subject: [cl-gd-devel] just to share In-Reply-To: Message-ID: <20051123133207.79835.qmail@web54111.mail.yahoo.com> never mind my post I figured myself whats wrong The angles that the function "draw-arc" accepts are actually the angles that the line that draws the ellipse forms with the x-axes, which is not the angle between the radius of the ellipse and the x-axes. Hope that is clear bye --- Edi Weitz wrote: > On Tue, 22 Nov 2005 03:54:35 -0800 (PST), arry wrote: > > > I just want to share a problem with cl-gd or maybe gd itself i don't > > know... > > > > Has anybody tried to draw an ellipse which starts and ends at a > > precise angle? Well, I have and it turns out that the angles that i > > have specified are not drawn exact , they are either bigger or > > smaller and SOMETIMES theyy are correct! > > > > is this a problem with gd or cl-gd? > > > > example > > I draw an ellipse that passes through two points then I want this > > ellipse to start from exactly one of the two point aand end at the > > other one. I calculate the angles with tthe help of the function > > (atan) or (asin) using the coordinates of the center of the ellipse > > and the two given points... > > > > and the angles drawn don't match with the given points That's > > funny!!! ridiculous!!! There's always 1 or 2 maybe more degrees > > discrapency between the angles drawn and the given points > > I don't have time to investigate this at the moment but if in doubt > I'd first try with a similar C program to see if the problems are in > GD. You also might want to check if any rounding errors occur within > CL-GD. > > Good luck, > Edi. > __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com