Selecting or deleting in an image by color or color range?
Oops, 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. -Ben ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Selecting or deleting in an image by color or color range?
Here's something I would use: (put in the script of the image) on mouseUp put the mousecolor into mcolor put numtochar(0) & numtochar(item 1 of mcolor) into hexcolor put numtochar(item 2 of mcolor) & numtochar(item 3 of mcolor) after hexcolor put numtochar(255)&numtochar(255)& numtochar(255)&numtochar(255) into blankcolor put the imagedata of me into idata replace hexcolor with blankcolor in idata set the imagedata of me to idata end mouseUp Now isn't that elegant!! This will turn all the instances of that color white, or at least it should. You'll need to use maskdata if you want to make the areas transparent. (This script is untested.) -Ben >Can an image have a selection by color or color range from within >Runtime so as to delete that color or range of colors in the image? It >would be like the eraser tool for a color. ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Selecting or deleting in an image by color or color range?
Can an image have a selection by color or color range from within Runtime so as to delete that color or range of colors in the image? It would be like the eraser tool for a color. ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution