Kamel-Media / Kamel

Kotlin asynchronous media loading and caching library for Compose.
Apache License 2.0
592 stars 23 forks source link

Base64 Encoded Images #106

Open andretietz opened 2 weeks ago

andretietz commented 2 weeks ago

Hey there, I couldn't find a way to load base64 encoded images from the database.

Is there a default implementation already? (like hand in a base64 string and it decodes it and shows it)

luca992 commented 2 weeks ago

Hi, there is not at the moment. But, I was thinking I could just make all the decoders public instead of internal here and that would let people use them standalone to create image painters if the want. Loading from a specific database would require making a fetcher which you can make yourself (however kamel's detection of the correct decoder to use currently relies on a file extension #81) so it probably wouldn't work for anything besides normal images, since images are the fallback when it can't determine a type