[FlashCodersNY] black and white image filter?
Rich Shupe
lists at fmaonline.com
Wed Oct 7 14:19:55 PDT 2009
In my opinion, the HDTV luminance values give the richest black and white
look. Below is the relevant passage from my book, Learning ActionScript 3.0
(O'Reilly).
Whatever you do, don't fall back on .3333 for each channel. The values below
look much better.
//ITU-R BT.709-5 Parameter Values for the HDTV
// Standards for Production, 2002
var lumRd:Number = .2127;
var lumGr:Number = .7152;
var lumBl:Number = .0722;
//grayscale
var grayscale:ColorMatrixFilter =
new ColorMatrixFilter([lumRd, lumGr, lumBl, 0, 0,
lumRd, lumGr, lumBl, 0, 0,
lumRd, lumGr, lumBl, 0, 0,
0, 0, 0, 1, 0]);
dispObj.filters = [grayscale];
Luminance is the amount of light that is reflected or emitted by a color. In
lay terms, luminance is brightness (which is more of a human perception than
a measured quantity). NTSC broadcast luminance constants (TV grayscale)
published in 1954 were replaced by values better tuned to CRT monitors and
computer displays.
For many years, Paul Haeberli¹s luminance vectors of .3086 for red, .6094
for green, and .0820 for blue, published in 1993, were used for color
grayscale. Recently, these values have been adjusted for HDTV standards and
are now slightly different. Red has reduced slightly, and green and blue
have increased slightly, over previous values. The current standard is .2127
for red, .7152 for green, and .0722 for blue. Experiment to see which
combination you prefer.
Rich
http://www.LearningActionScript3.com
More information about the FlashCodersNY
mailing list