add generate captcha image function