kuszaj/claptcha

Margin size raise error when running examples

kkorovesis opened this issue · 3 comments

c = Claptcha(randomString, "FreeMono.ttf", (100,30),
resample=Image.BICUBIC, noise=0.3)

ClaptchaError: Margin y cannot be larger than half of image height.

c = Claptcha(randomString, "FreeMono.ttf", (100,30),
resample=Image.BICUBIC, noise=0.3)

ClaptchaError: Margin y cannot be larger than half of image height.

try bigger size:
c = Claptcha(randomString, "FreeMono.ttf", (250,75), resample=Image.BICUBIC, noise=0.1)

My Code worked when I removed (100,30) from c = Claptcha(randomString, "FreeMono.ttf", (100,30),
resample=Image.BICUBIC, noise=0.3)

New code:
c = Claptcha(randomString, "FreeMono.ttf",
resample=Image.BICUBIC, noise=0.3)

But i don't know if this is right

However,

Change images' size to 150x90 and estimated margin to 25x25

c.size = (150,90)
c.margin = (25,25)

this method works