开发者

Replicate Photoshop adjustment layer in Flash

Is there anyway we can replicate Photoshop's adjustment layer in Flash?

I see that we can replicate开发者_StackOverflow社区 blend like overlay.

But didn't see a way to replicate Hue/Saturation adjustment layer for example.

Thanks,

Tee


You can use the ColorMatrixFilter - not sure if it will render exactly the same, but here a sample you can try:

var colorFilter:AdjustColor = new AdjustColor();
var mColorMatrix:ColorMatrixFilter;
var mMatrix:Array = [];
var MC:MovieClip = new MovieClip();

function adjustColors():void
{
    //all 4 must contain a value of an integer, if one is not set, it will not work
    colorFilter.hue = 50;
    colorFilter.saturation = 50;
    colorFilter.brightness = 50;
    colorFilter.contrast = 0;

    mMatrix = colorFilter.CalculateFinalFlatArray();
    mColorMatrix = new ColorMatrixFilter(mMatrix);

    MC.filters = [mColorMatrix];
}


True North Creative's answer will work if you take the AS3 route, but you would probably have more control and efficiency if you create/use Pixel Bender filters instead.

more here: http://www.adobe.com/devnet/pixelbender.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜