Introduction
Today I am bring you something really interesting that I think is worth sharing. Let me begin by showcasing the end result....
For further actions, you may consider blocking this person and/or reporting abuse
I'm trying to work out how to return the number of occurrences of each returned colour as well as the sorted value. I can't quite see how to do it when using recursive algorithms. Can anyone suggest a possibility?
Many thanks
very helpful! If only the function was faster :)
Amazing tutorial
How well explained, thank you.
Would you suggest to process the image at the client side or the server side
Its something you should want to have separated from your main services since its really heavy in the processing, it can take a while, for small tests like the one I did here it doesn't matter but for bigger apps take it into consideration.
if you try to use it with higher resolution images it will take several seconds, during that time your client will be blocked.
Cheers
Cover art from Music Albums tends to come in 300x300 max size. So I think this was intended for smaller image sizes.
Thinking outloud...
Larger images, perhaps user interaction should initiate the action to process the image to extract a palette for a specific purpose. If not in a flow of user interaction, I would question why the image needs to be so large. You could show the user a large image and process the palette from the same image, scaled down significantly, in the background. If you need something to automagically happen based on the user seeing a rather large image, with performance. IDK, just a thought, unless there is a faster way to retrieve the palette from an image. I am always about performance, even if just for 300x300 images in my scenario :)
Great job! Thank you very much!
Amazing article.
Thank you for this.
very helpful <3
Thank you for sharing this. That's will help me finish my project.
There is a small issue.
You still return RGB(0, 0, 0) as average, even if there was no color. I think it is better to return an empty array in that case.
Thanks for posting this. This will help me do similar w/ cover art driving the color palette of the page and animations on the page, real time, as songs change.