Selecting or deleting in an image by color or color range?
boinjyboing at hotmail.com
Tue Feb 1 18:40:27 CST 2005
The script worked for everything I tried. I guess in theory it might possibly erase unintended colors, although the odds of this are slim.
In imagedata the colors are handled as a set of four, with the first entry always being zero.
My solution might, trying to delete the color 0,12,12, end up accidentally turning the color (0),12,12,13 into (0),0,0,13.
A revised solution would use offset to find matches. If the mod base 4 of the offset isn't 1, then don't replace. This hopefully would fix the problem. Tell me if you need clarification of this.
More information about the use-livecode