WriteImage write image to front writer
(w io.Writer, id string, width, height int)
| 35 | |
| 36 | // WriteImage write image to front writer |
| 37 | func (this *CaptchaGenerator) WriteImage(w io.Writer, id string, width, height int) error { |
| 38 | var d = this.store.Get(id, false) |
| 39 | if d == nil { |
| 40 | return captcha.ErrNotFound |
| 41 | } |
| 42 | _, err := captcha.NewImage(id, d, width, height).WriteTo(w) |
| 43 | return err |
| 44 | } |
| 45 | |
| 46 | // Verify user input |
| 47 | func (this *CaptchaGenerator) Verify(id string, digits string) bool { |