Hi agraham
Thank's for the improvement, I tried it on my device the time is now about 6s instead of the 9s before.
I will try another idea, use the quick floodfill routine for the standard sized icon and then read the colors from there for the magnified icon, will see if there is a significant time improvement.
Thank you very much for your help and engagement. It's a pleasure to work on this forum with clever persons like you and some others.
Klaus
Switzerland