replied to @ubogun here
he reads this as well
but yeah taking the original picture, transforming the desired color to white pixels and all the rest to black then using that as a mask should work pretty quickly
EDIT : AH RIGHT !!!
I hate the way transform works
If you supply one map then every color that has any component that matches one index will get mapped to something else
If you supply 3 then any color that has any one of those gets mapped
Assume ALL entries map as map(i) = i except as noted
If you supply a single map with map(128) = 0
Then any pixel that has RGB = (128, 128, 128) would get mapped to (0,0,0)
But a RGB of (128, 245, 245) would turn into (0,245,245)
With 3 maps its not much different just that instead of the RGB values being mapped to the same value you could specify several
If you supply maps with redmap(128) = 0, greenmap(128) = 250, bluemap(128) = 30
Then any pixel that has RGB = (128, 128, 128) would get mapped to (0,250,30)
But a RGB of (128, 245, 245) would turn into (0,245,245)
And one of RGB( 245, 128, 245) would turn into (245, 250, 245)
Theres no map that looks up ALL components as ONE key and transforms those to some other single color
Transform seems to need a set up like :
dim map() as Dictionary
map.value( fromColor ) = toColor
Tranform( map )
and then pixels that match the KEY color would transform to the other color and NOTHING else would be altered