diff --git a/doc/index.html b/doc/index.html
index 39a7428..275e5e3 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -2376,7 +2376,7 @@
GIF animation
blue[i] = im:colorAllocate(0, 0, 120+6*i)
end
-fp = io.open("out.gif", "w")
+fp = io.open("out.gif", "wb")
assert(fp, "Failed to open file for writting")
fp:write(im:gifAnimBeginStr(true, 0))