Adapt second and third layer to big sizes

This commit is contained in:
Grégory Soutadé 2012-11-08 19:56:43 +01:00
parent 63357bf054
commit 9b9badef59

View File

@ -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); 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); c1 = gdImageColorAllocate(im, r*1^R, g*1^R, b*1^R);
c2 = gdImageColorAllocate(im, r*2^R, g*2^R, b*2^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, c2, font, size, rotation, x+(size/40), y, letter);
gdImageStringFT(im, brect, c1, font, size, rotation, x, y-1, letter); gdImageStringFT(im, brect, c1, font, size, rotation, x, y-(size/40), letter);
// Add another layer // 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 // Group letters
x += size; x += size;
} }