In version (0,3,0) in captcha\views.py, the image format is hard coded:
out = StringIO()
image.save(out, "PNG")
out.seek(0)
response = HttpResponse()
response['Content-Type'] = "image/png"
response.write(out.read())
Instead, I added this to captcha\conf\settings.py
CAPTCHA_IMAGE_FORMAT = getattr(settings, 'CAPTCHA_IMAGE_FORMAT', 'PNG')
CAPTCHA_IMAGE_CONTENT_TYPE = getattr(settings, 'CAPTCHA_IMAGE_CONTENT_TYPE', 'image/png')
and changed captcha\views.py to say:
out = StringIO()
image.save(out,settings.CAPTCHA_IMAGE_FORMAT)
out.seek(0)
response = HttpResponse()
response['Content-Type'] = settings.CAPTCHA_IMAGE_CONTENT_TYPE
response.write(out.read())
Original issue reported on code.google.com by KOstrom%...@gtempaccount.com on 27 Jul 2011 at 7:18
Original issue reported on code.google.com by
KOstrom%...@gtempaccount.com
on 27 Jul 2011 at 7:18