From 9b9badef590ff105730a15e1ff96e7df18f703c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 8 Nov 2012 19:56:43 +0100 Subject: [PATCH] Adapt second and third layer to big sizes --- gcaptchaz.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcaptchaz.c b/gcaptchaz.c index 9fbe984..2b53f44 100644 --- a/gcaptchaz.c +++ b/gcaptchaz.c @@ -168,10 +168,10 @@ static int generate_captcha(int width, int height, int inverse, char* font, char r = my_rand(30, 99) ; g = my_rand(30, 99) ; b = my_rand(30, 99); c1 = gdImageColorAllocate(im, r*1^R, g*1^R, b*1^R); c2 = gdImageColorAllocate(im, r*2^R, g*2^R, b*2^R); - gdImageStringFT(im, brect, c2, font, size, rotation, x+1, y, letter); - gdImageStringFT(im, brect, c1, font, size, rotation, x, y-1, letter); + gdImageStringFT(im, brect, c2, font, size, rotation, x+(size/40), y, letter); + gdImageStringFT(im, brect, c1, font, size, rotation, x, y-(size/40), letter); // Add another layer - gdImageStringFT(im, brect, c1, font, size, rotation, x+2, y+2, letter); + gdImageStringFT(im, brect, c1, font, size, rotation, x+(size/10), y+(size/10), letter); // Group letters x += size; }