[KWGT] Music info: "bp: bitmap not found or not loaded" on some elements but not others

I have a music widget which looks alike the Google Play Music widget, except even better to my taste.

The bottom bar, along with the Play/Pause FAB, colors according to the cover art. It works, except on some tracks the cover art shows but the FAB is blank, and going into its color formula I get the error as described in the title: "bp: bitmap not found or not loaded" - which is neither of those cases since the rest of the widget colors itself and the cover art shows just fine.

Hi! So, the error is normal, it means that the cover is not loaded yet and might be ok, the problem is that some image does not have enough info to extract a vibrant color, the result is that the formula then returns an empty value. So, right now the solution is to write something like this:

$if(bp(vibrant, mi(cover)), bp(vibrant, mi(cover)), #00FF00)$

Doing this will basically return #00FF00 id the cover has no vibrant color.

I have created an internal TODO item to add an option to bp so then you can use bp(vibrant, bitmap, [defaultcolor]), it will be probably be available soon.

P.S. you can even try to return the "muted" color if no vibrant is there but this might also not be there

Oh I see. Thanks for the reply!

How does the color extraction method works? Is it like other "color palette" extraction libraries I've used which returns an array of colors from the most used to the least used, or perhaps it has to do with the Android color extraction methods? What are the functions that will always return a value?

Also as I was writing this the next track in the album started playing and KWGT picked a vibrant color - thing is the cover art is the same.

Kustom currently uses the Android Palette Library i could return the first Swatch (if any) when no vibrant color is found maybe. If the color is updated when changing track and cover is the same that might be a bug, i will try to investigate that.

Thanks for the reply!

And you could return a color when there isn't defined by the Palette class for consistency, but I guess that could also fall onto the widget / live wallpaper author to do that.

Again, thanks!

I am experiencing the same problem with the notification (b)icon. The problem is mainly, the returned info is not consistent. Icon 1 gives a muted, Icon 2 does not have muted but mutedbc, etc......A fallback default would be great, to minimize the formulas :):):)