|
||||||
|
||||||
Color Matrix Filter with ActionScript

Free
Flash Tutorial
Step Six: Matrix Settings - Color Shift & Grayscale
If you want the amount of red in the source image to dictate the green value in the result image:
[1,0,0,0,0, /* Red */
1,0,0,0,0, /* Green */
0,0,1,0,0, /* Blue */
0,0,0,1,0 ]; /* Alpha Transparency */
Green is set by red value.
Here all the colors channels have been shifted to the wrong place :
[0,0,1,0,0, /* Red */
1,0,0,0,0, /* Green */
0,1,0,0,0, /* Blue */
0,0,0,1,0 ]; /* Alpha Transparency */
All colors have been shifter to the wrong place!
Add the blue into the red column and all color information is set by the red channel thus all colors are the same:
[1,0,0,0,0, /* Red */
1,0,0,0,0, /* Green */
1,0,0,0,0, /* Blue */
0,0,0,1,0 ]; /* Alpha Transparency */
All colors are set by red which gives black and white!
True Grayscale :
[.33,.33,.33,0,0, /* Red */
.33,.33,.33,0,0, /* Green */
.33,.33,.33,0,0, /* Blue */
0,0,0,1,0 ]; /* Alpha Transparency */
All colors are set by red which gives black and white!
|
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
•
8418 visitors to this page since
2 April 07 •
|
|
|
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|