Adafruit_CircuitPython_ImageLoad icon indicating copy to clipboard operation
Adafruit_CircuitPython_ImageLoad copied to clipboard

Add JPG to Imageload

Open DJDevon3 opened this issue 1 year ago • 6 comments
trafficstars

Not sure if imageload has JPG capability. RTD is lacking details. Would very much appreciate a JPG simpletest example.

DJDevon3 avatar Apr 09 '24 23:04 DJDevon3

I don't believe it does. I'd recommend using jpegio.

makermelissa avatar Apr 10 '24 15:04 makermelissa

I find it odd that every other file type can be used by imageload except for JPG. I did figure out how to use jpegio eventually which has drastically different syntax than imageload. For consistency it would be nice to have JPG in imageload. I have no idea if that's feasible, a bad idea, etc...

I didn't realize JPG wasn't in imageload when I created this request. Should I change the title to "Please add JPG to Imageload"? Is that even a valid request I have no idea.

DJDevon3 avatar Apr 10 '24 22:04 DJDevon3

jpeg is much more complex than the other types. I think it has been attempted before, but never successful. Maybe somebody can reverse engineer jpegio to add it?

makermelissa avatar Apr 11 '24 23:04 makermelissa

I thought I was suggesting using jpegio in this library. I didn't mean it should be reimplemented. I just meant it could be used to provide a uniform API for loading jpg's.

dhalbert avatar Apr 11 '24 23:04 dhalbert

Yes, that's what I meant, if its possible. Doesn't matter if it's another layer of abstraction. The consistency for usage would be welcomed.

DJDevon3 avatar Apr 12 '24 04:04 DJDevon3

I'm not sure if jpegio is enabled for most boards or not. If it is, we could just add a layer to this library that calls jpegio. If not, then it may be useful to add for boards that have less flash for CP.

makermelissa avatar Apr 12 '24 15:04 makermelissa

SWEET! 🎉

DJDevon3 avatar Jul 28 '24 09:07 DJDevon3