Skip to content

Commit 6e7ec89

Browse files
authored
PicoGraphics: document dither=False
1 parent c9bee93 commit 6e7ec89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

micropython/modules/picographics/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ j = jpegdec.JPEG(display)
562562
j.open_file("filename.jpeg")
563563

564564
# Decode the JPEG
565-
j.decode(0, 0, jpegdec.JPEG_SCALE_FULL)
565+
j.decode(0, 0, jpegdec.JPEG_SCALE_FULL, dither=True)
566566

567567
# Display the result
568568
display.update()
@@ -579,3 +579,4 @@ The arguments for `decode` are as follows:
579579
1. Decode X - where to place the decoded JPEG on screen
580580
2. Decode Y
581581
3. Flags - one of `JPEG_SCALE_FULL`, `JPEG_SCALE_HALF`, `JPEG_SCALE_QUARTER` or `JPEG_SCALE_EIGHTH`
582+
4. If you want to turn off dither altogether, try `dither=False`. This is useful if you want to pre-dither your images or for artsy posterization effects.

0 commit comments

Comments
 (0)