View Single Post
Old 08-12-2019, 10:51 AM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
And as far as images are concerned, you can avoid the encoding process for Pillow-generated content, and directly pass the raw data to fbink_print_raw_data() (c.f., the Pillow example).

You also *probably* don't need to do an invert via ImageOps, FBInk can either do it itself (bracket your print call between fbink_cfg.is_inverted = True and fbink_cfg.is_inverted = False), or, better, let the device's hardware do it (same idea, but with is_nightmode instead or is_inverted).

Both solutions imply that the refresh region only contains the image in question, though, because the inversions will apply to the full region .
(Which shouldn't be an issue here, unless you're doing some fancy batch-processing with no_refresh set during fbink_print_*() and then a final fbink_refresh())

Last edited by NiLuJe; 08-12-2019 at 10:54 AM.
NiLuJe is offline   Reply With Quote