We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add possible to change the ratio of height Now this multiplier is hardcoded to 1.2
size = (size[0] * 2, int(size[1] * 1.2))
Full code
def captcha_image(request, key, scale=1): store = get_object_or_404(CaptchaStore, hashkey=key) text = store.challenge if settings.CAPTCHA_FONT_PATH.lower().strip().endswith('ttf'): font = ImageFont.truetype(settings.CAPTCHA_FONT_PATH, settings.CAPTCHA_FONT_SIZE * scale) else: font = ImageFont.load(settings.CAPTCHA_FONT_PATH) size = font.getsize(text) size = (size[0] * 2, int(size[1] * 1.2))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add possible to change the ratio of height
Now this multiplier is hardcoded to 1.2
Full code
The text was updated successfully, but these errors were encountered: