Fix error in example code
The parameter `greyscale` is set to True by default. The incorrect example code did not specify `greyscale` to be False for use with a colour image, and was expecting 3 (grayscale) values per row instead of 9 (RGB).
@@ -97,7 +97,7 @@ the separate pixels; they have no meaning in the code. ::
p = [(255,0,0, 0,255,0, 0,0,255),
(128,0,0, 0,128,0, 0,0,128)]
f = open('swatch.png', 'wb')
- w = png.Writer(3, 2)
+ w = png.Writer(3, 2, greyscale=False)
w.write(f, p)
f.close()
