Image processing and effects in ActionScript-3
The most efficient way to process images is to use the Adobe Pixel Bender . It is basically a pixel shader like a language that can be used to create filters for Photoshop, After Effects, and Flash. There is also an exchange where developers exchange filters .
Here is a tutorial on how to load a pixel filter in Flash .
More information is available if you google for "pixel pixel flash" .
source to share
This post explains how to do GrayScale:
AS3: How do I change the BitmapData of a color bitmap to black and white?
Sepia is a combination of grayscale and toning. Toning is usually done by multiplying one of the color channels by a certain amount to enhance that color.
The techniques illustrated in this article are how you should proceed. You will have to look for pixel filtering algorithms, but many of them exist on wikipedia or mathematics sites.
source to share