all repos — captcha @ a9e88462c0b1e354e0f39c1a55021efbce728c7b

Go package captcha implements generation and verification of image and audio CAPTCHAs.

Add notice about Image.WriteTo to BUGS.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 23:43:27 +0200
commit

a9e88462c0b1e354e0f39c1a55021efbce728c7b

parent

4b8382af1554c4a28cf9819998a1e99b48908281

1 files changed, 4 insertions(+), 3 deletions(-)

jump to
M image.goimage.go

@@ -58,10 +58,11 @@ img.strikeThrough()

return img } +// BUG(dchest): While Image conforms to io.WriterTo interface, its WriteTo +// method returns 0 instead of the actual bytes written because png.Encode +// doesn't report this. + // WriteTo writes captcha image in PNG format into the given writer. -// -// Bug: while Image conforms to io.WriterTo interface, this function returns 0 -// instead of the actual bytes written because png.Encode doesn't report this. func (img *Image) WriteTo(w io.Writer) (int64, os.Error) { return 0, png.Encode(w, img) }