Commit Graph

70 Commits

Author SHA1 Message Date
Jeff Epler
774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally 2023-10-30 09:49:06 +01:00
Dan Halbert
6851faacaa Merge remote-tracking branch 'adafruit/main' into merge-micropython-v1.19.1 2023-08-18 13:29:39 -04:00
Dan Halbert
d582407b06 pre-commit fixes 2023-08-14 00:59:22 -04:00
Melissa LeBlanc-Williams
ce61fd857b Bug fix for skip on only one bmp 2023-08-10 08:15:18 -07:00
Melissa LeBlanc-Williams
78d1ebb529 Fix calculations 2023-08-08 18:33:09 -07:00
Melissa LeBlanc-Williams
5393bc4ed0 More formatting 2023-08-08 13:07:50 -07:00
Melissa LeBlanc-Williams
c9c7f02ba4 Fix formatting 2023-08-08 13:03:09 -07:00
Melissa LeBlanc-Williams
549bbdc31c Alphablend changes 2023-08-08 12:42:48 -07:00
foamyguy
72857994f2 change skip_index to skip_source_index 2023-07-05 17:27:41 -05:00
foamyguy
a2ff9527dc format 2023-07-02 14:40:56 -05:00
foamyguy
96d3e662b3 refactor bitmap.blit into bitmaptools 2023-07-02 14:35:40 -05:00
jposada202020
1931b6c042 fixing algorithm and MAX 2023-03-30 18:08:17 -04:00
jposada202020
4986ad6d6b
Update shared-module/bitmaptools/__init__.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:43:57 -04:00
jposada202020
f6a0fb20f2
Update shared-module/bitmaptools/__init__.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:29:39 -04:00
jposada202020
533f532ff2
Update shared-module/bitmaptools/__init__.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:29:18 -04:00
jposada202020
6ad053e403 correcting feedback 2023-03-30 08:51:52 -04:00
jposada202020
f3d85d6932 Merge branch 'main' into adding_circle_bitmaptools 2023-03-30 07:44:07 -04:00
hathach
8c1095b268
Merge branch 'main' into add-codespell 2023-03-23 14:09:57 +07:00
jposada202020
29613c73e1 pre-commit 2023-03-22 19:05:18 -04:00
jposada202020
0b3099a9ff adding bitmaptools circle 2023-03-22 18:44:45 -04:00
hathach
fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
foamyguy
d30b89d8d1 Merge branch 'main' into boundary_fill_background_tasks 2023-03-14 18:24:01 -05:00
foamyguy
7740cbac97 do background tasks and handle interrupt during boundary fill 2023-03-04 13:13:59 -06:00
Maciej Sokołowski
e474df3a18 Add function for drawing polygons to bitmaptools 2023-01-20 23:14:38 +01:00
Maciej Sokołowski
2276254f6c Fix compilation 2023-01-19 21:50:59 +01:00
Maciej Sokołowski
483f14b73f Allow lines with ends out of bitmap in bitmaptools_obj_draw_line 2023-01-19 21:37:25 +01:00
Jeff Epler
34043c2d38
Only store up to 'width' pixels, not 'stride'
error detected by clang scan-build static analysis
2023-01-01 16:45:40 -06:00
Tsutomu IKEGAMI
c9aa4527a9 Fix freeze on bitmaptools.dither 2022-03-04 17:06:07 +09:00
Jeff Epler
30c07a772f
bitmaptools: dither: get rid of shifts
this happens to make the occasional FS dither artifact disappear.
I guess `a * b >> 8` and `(a * b) / 256` are not identical.  I'm not
sure if it was just the parens or not, but write the clearer code and
rely on the compiler to substitute an appropriate shift if possible.
2021-11-24 09:51:24 -06:00
Jeff Epler
9af76a2f03
bitmaptools dither: Fix off-by-one error filling row data 2021-11-24 09:51:23 -06:00
Jeff Epler
ee5e7161af
bitmaptools: use stream API
this allows `readinto` to succeed in the unix port, where the VFS
is not FAT
2021-11-20 08:51:40 -05:00
Jeff Epler
d55388a17d
Add bitmaptools to unix build 2021-11-12 10:47:18 -06:00
Jeff Epler
621953c960
Additional missing-prototypes fixes
I think this correctly enables missing-prototypes in atmel-samd
and raspberrypi ports.
2021-11-10 10:55:53 -06:00
Jeff Epler
cbfa41f238 Merge remote-tracking branch 'origin/main' into dither3 2021-11-08 16:46:36 -06:00
Jeff Epler
eaf8bc0abe bitmaptools: add dither
This can convert a BGR565_SWAPPED bitmap to B&W in about 82ms on
esp32-s2.
2021-11-08 10:35:44 -06:00
Jeff Epler
dfafab675f Enable L8 mode for alphablend 2021-11-05 11:26:07 -05:00
Jeff Epler
2ec2761ce0 bitmaptools: add alphablend
This blends two "565"-format bitmaps, including byteswapped ones. All
the bitmaps have to have the same memory format.

The routine takes about 63ms on a Kaluga when operating on 320x240 bitmaps.
Of course, displaying the bitmap also takes time.

There's untested code for the L8 (8-bit greyscale) case. This can be
enabled once gifio is merged.
2021-11-05 08:16:48 -05:00
James Carr
56ecdee5a0
Correct the 24bit decoding in bitmaptools.readinto() 2021-09-13 19:50:35 +01:00
foamyguy
80c7a15df7 fix dirty area initial points 2021-08-22 10:52:28 -05:00
foamyguy
0f478d59fe remove string import. use minimum sized dirty area 2021-08-21 16:15:59 -05:00
foamyguy
aeeba3904b changed argument names and make replaced_color_value argument optional 2021-08-21 11:08:25 -05:00
foamyguy
6f783060c2 ignore points outside of bitmap 2021-08-15 19:11:15 -05:00
foamyguy
ec8b31e7b4 code format and translations 2021-08-13 10:13:38 -05:00
foamyguy
c1e164e1ff rename to boundary_fill and clean up comments 2021-08-13 09:52:51 -05:00
foamyguy
fd372cf06c it works! 2021-08-09 13:15:58 -05:00
foamyguy
87358f81b2 trying to check next pixel 2021-08-09 08:30:12 -05:00
foamyguy
158048e56b trying to make lists 2021-08-08 14:33:07 -05:00
foamyguy
6d57f43eb3 try adding print 2021-08-08 09:34:52 -05:00
foamyguy
bcfec10552 starting bitmaptools.paint_fill 2021-08-08 09:31:09 -05:00
Jeff Epler
a05aab8304
Merge pull request #4454 from jepler/bitmaptools-readinto-4bit
Fix reading 4-bit data
2021-03-21 19:56:23 -05:00