adafruit / Adafruit_CircuitPython_ImageLoad

Super-slim image decoder that loads code as needed to minimize memory use
MIT License
15 stars 21 forks source link

Provide default behavior for bitmap and palette parameters? #36

Closed caternuson closed 4 years ago

caternuson commented 4 years ago

This is currently the simplest load statement:

image, palette = adafruit_imageload.load("omg_cute_kitteh.bmp", bitmap=displayio.Bitmap, palette=displayio.Palette)

Those options for the bitmap and palette parameter probably cover the majority of use cases. Could we make them default? That would then allow for:

image, palette = adafruit_imageload.load("omg_cute_kitteh.bmp")

The above statement currently runs without error, but returns NoneTypes.

caternuson commented 4 years ago

@tannewt Thoughts on this? This feels like one of those things where it's like this for a reason, but I'm just not seeing or understanding it. Thanks :)

tannewt commented 4 years ago

I don't see a reason not to support it.