import fl.motion.ColorMatrix;

import flash.filters.ColorMatrixFilter;

//**调整亮度**//

var ld_Matrix:ColorMatrix=new ColorMatrix();

var ld_Filter:ColorMatrixFilter=new ColorMatrixFilter();

ld_Matrix.SetBrightnessMatrix(100);  //设置亮度值,值的大小是 -255--255   0为中间值,向右为亮向左为暗。

ld_Filter.matrix = ld_Matrix.GetFlatArray();

ld_MC.filters = [ld_Filter];

//ld_MC.filters = [];//去除滤镜

//**调整对比度**//

var db_Matrix:ColorMatrix=new ColorMatrix();

var db_Filter:ColorMatrixFilter=new ColorMatrixFilter();

db_Matrix.SetContrastMatrix(255);  //设置对比度值,值的大小是 -255--255  127.5为中间值,向右对比鲜明向左对比偏暗。

db_Filter.matrix = db_Matrix.GetFlatArray();

db_MC.filters = [db_Filter];

//db_MC.filters = [];//去除滤镜

//**调整饱和度**//

var bh_Matrix:ColorMatrix=new ColorMatrix();

var bh_Filter:ColorMatrixFilter=new ColorMatrixFilter();

bh_Matrix.SetSaturationMatrix(0);  //设置饱和度值,值的大小是 -255--255   1为中间值,0为灰度值(即黑白相片)。

bh_Filter.matrix = bh_Matrix.GetFlatArray();

bh_MC.filters = [bh_Filter];

//bh_MC.filters = [];//去除滤镜

//**调整色相**//

var sx_Matrix:ColorMatrix=new ColorMatrix();

var sx_Filter:ColorMatrixFilter=new ColorMatrixFilter();

sx_Matrix.SetHueMatrix(1);  //设置色相值,值的大小是 -255--255  0为中间值,向右向左一试便知。

sx_Filter.matrix = sx_Matrix.GetFlatArray();

sx_MC.filters = [sx_Filter];

//sx_MC.filters = [];//去除滤镜

[ActionScript 3.0] 亮度、对比度、饱和度、色相的调整的更多相关文章

  1. Unity Shader-后处理:简单的颜色调整(亮度,饱和度,对比度)

    好久没坚持写blog了,是时候开始撸一波新博文了!学习Unity有一段时间了,关于Shader的书也看了几本<Unity Shader入门精要>,<Unity 3D ShaderLa ...

  2. 【Unity Shaders】使用Unity Render Textures实现画面特效——画面特效中的亮度、饱和度和对照度

    本系列主要參考<Unity Shaders and Effects Cookbook>一书(感谢原书作者),同一时候会加上一点个人理解或拓展. 这里是本书全部的插图. 这里是本书所需的代码 ...

  3. ActionScript 3.0入门:Hello World、文件读写、数据存储(SharedObject)、与JS互调

    近期项目中可能要用到Flash存取数据,并与JS互调,所以就看了一下ActionScript 3.0,现把学习结果分享一下,希望对新手有帮助. 目录 ActionScript 3.0简介 Hello ...

  4. ActionScript 3.0 for the Lunder Algorithm

    package com.feiruo.Calendar.LunderCalendar { /* *@ClassName: package:com.feiruo.Calendar.LunderCalen ...

  5. [转]ActionScript 3.0入门:Hello World、文件读写、数据存储(SharedObject)、与JS互调

    本文转自:http://www.cnblogs.com/artwl/p/3396330.html 近期项目中可能要用到Flash存取数据,并与JS互调,所以就看了一下ActionScript 3.0, ...

  6. [ActionScript 3.0] AS3.0 动态加载显示内容

    可以将下列任何外部显示资源加载到 ActionScript 3.0 应用程序中: 在 ActionScript 3.0 中创作的 SWF 文件 — 此文件可以是 Sprite.MovieClip 或扩 ...

  7. 【转】学习Flex ActionScript 3.0 强烈推荐电子书

    学习Flex ActionScript 3.0 强烈推荐电子书 AdvancED ActionScript 3.0 Animation(<Make things  move>姐妹篇,强烈推 ...

  8. ActionScript 3.0 API 中的 Video 类

    注:这个类在Flash流媒体开发中使用的很频繁,在此记录一下它的使用方法. 包 flash.media 类 public class Video 继承 Video  DisplayObject  Ev ...

  9. [ActionScript 3.0] as3处理xml的功能和遍历节点

    as3比as2处理xml的功能增强了N倍,获取或遍历节点非常之方便,类似于json对像的处理方式. XML 的一个强大功能是它能够通过文本字符的线性字符串提供复杂的嵌套数据.将数据加载到 XML 对象 ...

随机推荐

  1. rocketmq--push消费过程

    Rocketmq消费分为push和pull两种方式,push为被动消费类型,pull为主动消费类型,push方式最终还是会从broker中pull消息.不同于pull的是,push首先要注册消费监听器 ...

  2. java中的不死兔问题(斐波那契数列)(递归思想)

    有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少? public class Item { public static ...

  3. cacti监控mssql 2005运行资源情况

    概述:SQL Server2000\2005\2008本身不支持snmp,使用cacti监控mssql,必须通过php连接mssql来获取SQL 2005性能计算器的值. 操作步骤: 1.php连接m ...

  4. 在Qt中使用SQLite数据库

    前言 SQLite(sql)是一款开源轻量级的数据库软件,不需要server,可以集成在其他软件中,非常适合嵌入式系统. Qt5以上版本可以直接使用SQLite(Qt自带驱动). 用法 1 准备 引入 ...

  5. name相同获取值

    <html> <head> </head> <body> <form name="form1" method="po ...

  6. 前台的json数组转化为List<T>集合

    using System;using System.Collections.Generic;using System.Linq;using System.Runtime.Serialization;u ...

  7. log4j-over-slf4j工作原理详解

    log4j-over-slf4j工作原理详解 摘自:https://blog.csdn.net/john1337/article/details/76152906 置顶 2017年07月26日 17: ...

  8. UEFI下win10+Ubuntu双启动后完全纯净卸载Ubuntu,重建BCD

    以下内容操作具有风险,操作前请提前备份数据.建议由有丰富经验的人使用,需要掌握diskpart. 背景 使用ubuntu+win10 dual boot后,需要重置回纯净win10系统. BCD是Bo ...

  9. 1146 ID Codes

    题目链接: http://poj.org/problem?id=1146 题意: 给定一个字符串(长度不超过50), 求这个字符串的下一个字典序的字符串, 如果已经是最大字典序, 那么输出 " ...

  10. [GO]单向channel和应用

    var ch1 chan int  //ch1是一个正常的channel,不是单向的 var ch2 chan <- float64   //ch2是一个单向的channel,只用于写float ...