There is still one option that uses a weighted grayLevel-mean (I use these weights in imageJIT). This would reflect more than simple averaging that one wants a dark/light decision.
return (0.1*byteToNum(byte 2 of iData) \ + 0.6*byteToNum(byte 3 of iData) \ + 0.3*byteToNum(byte 4 of iData)) Also, what will be still fast enough, you could think about scaling down _proportional_ to 3x2 pixels (or 12x8 pixels) and then applying the above weighted mean on these few pixels. p.s. I checked: The one-pixel color is by LC built from the arithmetic mean of the color channels, nearly as fast as an external! _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode