Hello
I'm trying to make an image filter that computes the optimal transparency key for alpha test purposes.
First it computes the average color at the bounds.
Then it should find the closest color of this color (that is not present in the image) to fill RGB transparent areas.
My problem is : given a manhattan distance, how to find all the permutations of the given color ?
For example for distance=1, the permutations are :
(red+1,green,blue)
(red-1,green,blue)
(red,green+1,blue)
(red,green-1,blue)
(red,green,blue+1)
(red,green,blue-1)
Thanks for your help =)
Nico