/**
* 获取像素点的灰度
* @color 像素点的颜色值
* @return uint
*/
function getGray(color:uint):uint
{
return getR(color) * 0.299 + getG(color) * 0.587 + getB(color) * 0.114;
}
function getR(color:uint):uint
{
return color << 8 >>> 24;
}
function getG(color:uint):uint
{
return color << 16 >>> 24;
}
function getB(color:uint):uint
{
return color << 24 >>> 24;
}

最新文章

  1. android服务里生成通知点击后返回正在运行的程序和当前的Activity
  2. 自定义CollectionViewLayout
  3. 尝试一下代码高亮。。成功的话明天写一篇blog
  4. 解决服务器上 w3wp.exe 和 sqlservr.exe 的内存占用率居高不下的方案
  5. Spring基础—— Bean 的作用域
  6. 实战Django:简易博客Part1
  7. [2014-03-13 08:46:42 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
  8. CreateObject(&quot;Wscript.Shell&quot;)用法
  9. 网站如何防Session冒名顶替和cookie防篡改
  10. 状态机的c语言编程
  11. [每日一题jQuery] jQuery选择器总结:进一步过滤、同级操作、后代操作
  12. poj2538---字符匹配(映射)
  13. Win10专业版下图片拖到PS无法打开的解决技巧
  14. shell 脚本编写 if else then
  15. MTK Android添加驱动模块
  16. SAP MM 根据采购订单反查采购申请?
  17. flask 电子邮件Flask-Mail
  18. Laravel 项目中编写第一个 Vue 组件
  19. Linux中实现文本过滤
  20. shell if [[ ]]的一次应用

热门文章

  1. linux包之iproute之ip命令
  2. nodejs 任务调度使用
  3. linux下文件合并、分割、去重
  4. 决策树模型组合之(在线)随机森林与GBDT
  5. 基于LBS的地理位置附近的搜索以及由近及远的排序
  6. C#动态数组ArrayList和List&lt;T&gt;的比较
  7. jsPlumb 学习笔记
  8. MongoDB备份与导入
  9. mootools upgrate from 1.2 to 1.3 or 1.4
  10. 【oracle】数据库、表空间、用户、数据表之间的关系