Skip to content

Commit 7b73521

Browse files
authored
Merge pull request #739 from pimoroni/helgibbons-patch-1
PicoGraphics: document `dither=False`
2 parents 40d4774 + 5fa99c0 commit 7b73521

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

micropython/examples/galactic_unicorn/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Galactic Unicorn MicroPython Examples <!-- omit in toc -->
2-
2+
33
- [About Galactic Unicorn](#about-galactic-unicorn)
44
- [Galactic Unicorn and PicoGraphics](#galactic-unicorn-and-picographics)
55
- [Examples](#examples)
@@ -150,4 +150,5 @@ Here are some cool Galactic Unicorn community projects and resources that you mi
150150
- :link: [Galactic Unicorn Graphical Workout](https://www.instructables.com/Galactic-Unicorn-Graphical-Workout/)
151151
- :link: [Galactic Unicorn Bounce - Simple GFX Demo](https://www.instructables.com/Galactic-Unicorn-Bounce-Simple-GFX-Demo/)
152152
- :link: [Cheerlights + Galactic Unicorn + MicroPython (beginner-friendly tutorial)](https://cheerlights.com/cheerlights-raspberry-pi-pico-w-micropython/)
153-
- :link: [CheerClock (plus laser-cut templates for a fancy case/diffuser)](https://github.com/seanosteen/CheerClock)
153+
- :link: [CheerClock (plus laser-cut templates for a fancy case/diffuser)](https://github.com/seanosteen/CheerClock)
154+
- :link: [Make a giant Pomodoro timer using Galactic Unicorn](https://www.raspberrypi.com/news/make-a-giant-pomodoro-timer-using-galactic-unicorn/)

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](https://ditherit.com/) or for artsy posterization effects.

0 commit comments

Comments
 (0)