Merge pull request #739 from pimoroni/helgibbons-patch-1
PicoGraphics: document `dither=False`
This commit is contained in:
commit
7b7352130f
|
@ -1,5 +1,5 @@
|
||||||
# Galactic Unicorn MicroPython Examples <!-- omit in toc -->
|
# Galactic Unicorn MicroPython Examples <!-- omit in toc -->
|
||||||
|
|
||||||
- [About Galactic Unicorn](#about-galactic-unicorn)
|
- [About Galactic Unicorn](#about-galactic-unicorn)
|
||||||
- [Galactic Unicorn and PicoGraphics](#galactic-unicorn-and-picographics)
|
- [Galactic Unicorn and PicoGraphics](#galactic-unicorn-and-picographics)
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
|
@ -150,4 +150,5 @@ Here are some cool Galactic Unicorn community projects and resources that you mi
|
||||||
- :link: [Galactic Unicorn Graphical Workout](https://www.instructables.com/Galactic-Unicorn-Graphical-Workout/)
|
- :link: [Galactic Unicorn Graphical Workout](https://www.instructables.com/Galactic-Unicorn-Graphical-Workout/)
|
||||||
- :link: [Galactic Unicorn Bounce - Simple GFX Demo](https://www.instructables.com/Galactic-Unicorn-Bounce-Simple-GFX-Demo/)
|
- :link: [Galactic Unicorn Bounce - Simple GFX Demo](https://www.instructables.com/Galactic-Unicorn-Bounce-Simple-GFX-Demo/)
|
||||||
- :link: [Cheerlights + Galactic Unicorn + MicroPython (beginner-friendly tutorial)](https://cheerlights.com/cheerlights-raspberry-pi-pico-w-micropython/)
|
- :link: [Cheerlights + Galactic Unicorn + MicroPython (beginner-friendly tutorial)](https://cheerlights.com/cheerlights-raspberry-pi-pico-w-micropython/)
|
||||||
- :link: [CheerClock (plus laser-cut templates for a fancy case/diffuser)](https://github.com/seanosteen/CheerClock)
|
- :link: [CheerClock (plus laser-cut templates for a fancy case/diffuser)](https://github.com/seanosteen/CheerClock)
|
||||||
|
- :link: [Make a giant Pomodoro timer using Galactic Unicorn](https://www.raspberrypi.com/news/make-a-giant-pomodoro-timer-using-galactic-unicorn/)
|
|
@ -562,7 +562,7 @@ j = jpegdec.JPEG(display)
|
||||||
j.open_file("filename.jpeg")
|
j.open_file("filename.jpeg")
|
||||||
|
|
||||||
# Decode the JPEG
|
# Decode the JPEG
|
||||||
j.decode(0, 0, jpegdec.JPEG_SCALE_FULL)
|
j.decode(0, 0, jpegdec.JPEG_SCALE_FULL, dither=True)
|
||||||
|
|
||||||
# Display the result
|
# Display the result
|
||||||
display.update()
|
display.update()
|
||||||
|
@ -579,3 +579,4 @@ The arguments for `decode` are as follows:
|
||||||
1. Decode X - where to place the decoded JPEG on screen
|
1. Decode X - where to place the decoded JPEG on screen
|
||||||
2. Decode Y
|
2. Decode Y
|
||||||
3. Flags - one of `JPEG_SCALE_FULL`, `JPEG_SCALE_HALF`, `JPEG_SCALE_QUARTER` or `JPEG_SCALE_EIGHTH`
|
3. Flags - one of `JPEG_SCALE_FULL`, `JPEG_SCALE_HALF`, `JPEG_SCALE_QUARTER` or `JPEG_SCALE_EIGHTH`
|
||||||
|
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.
|
||||||
|
|
Loading…
Reference in New Issue