Consider using `rich-pixels` instead of custom `Image`
JoshKarpel opened this issue · 1 comments
rich-pixels
covers the same ground (and more) as spiel.Image
(which, incidentally, I actually forgot to re-export from spiel/__init__.py
Line 26 in acde09b
We should probably drop Image
and just use rich-pixels
for images, potentially with a caching layer on top for our special case of needing to re-render slide contents so often.
Turns out there's a subtle but important difference: it looks like rich-pixels
can resize when it loads an image, but it doesn't dynamically size the image to the available size like we do (by using __rich_console__
spiel/spiel/renderables/image.py
Lines 85 to 88 in 9277169
I'm also not seeing the "two pixels per row" hack
spiel/spiel/renderables/image.py
Lines 35 to 44 in 9277169
rich-pixels
. So, I will stick with Image
for now.