naggie / crates

2013: Crates, a media database with immutability, federation and filesystem mapping, playlists for DJing
MIT License
5 stars 2 forks source link

Albums with placeholders #13

Closed naggie closed 9 years ago

naggie commented 9 years ago

Idea: something like this : http://gradifycss.com/ when loading albums.

Mostly implemented. Using k-groups for colour selection. Using py-color-thief at the moment, but may look at http://charlesleifer.com/blog/using-python-and-k-means-to-find-the-dominant-colors-in-images/

https://www.youtube.com/watch?v=Cp4XNH4ipEM

(Original and main point of placeholders is to stop the document from re-flowing with every image load due to responsive nature of page)

naggie commented 9 years ago

Done! No fading.

Also files without a cover get a colour.

naggie commented 9 years ago

image

Generated colour is based on constant saturation & value, with the Hue derived from the adler32 (similar to CRC32) calc. Dominant colour is based on K-means grouping.