color_blackandwhite.py revision cd696fbc55a8d796d39a487f7311d473ee5a9a49
import coloreffect,sys
class C(coloreffect.ColorEffect):
help="Threshold Color Level")
#ITU-R Recommendation BT.709
#l = 0.2125 * r + 0.7154 * g + 0.0721 * b
#NTSC and PAL
l = 0.299 * r + 0.587 * g + 0.114 * b
ig = 255
else:
ig = 0
#coloreffect.debug('gs '+hex(r)+' '+hex(g)+' '+hex(b)+'%02x%02x%02x' % (ig,ig,ig))
c = C()
c.affect()