flash 图像显示
AdjustDisplayObject.rar
包含3个类,都是类函数
DisplayObjectAdjustColor 类包含对显示对象进行调整颜色的静态方法:亮度、对比度、饱和度和色相。
DisplayObjectFilters
类包含各种对显示对象进行过滤的常数值和方法,包括:相底反色效果、灰度、查找边缘、锐化、马赛克效果(两种方法)、浮雕效果、杂点效果、素描效果、水彩
效果、扩散效果(毛玻璃效果)、球面效果(鱼眼效果)、挤压效果、光照效果(高光效果)、PS里的颜色阈值效果、油画效果、旧照片效果。
BitmapTransformer 类包含各种对显示对象进行变形转换的方法,包括:裁剪、旋转、缩放、倾斜、对齐、分布。
用上面的mosaicFilter2来做一个flex中的马赛克的tweenEffect效果
package {
import mx.effects.IEffectInstance;
import mx.effects.TweenEffect;
public class Mosaic extends TweenEffect {
public function Mosaic(target:Object = null) {
super(target);
instanceClass = MosaicInstance;
}
public var scaleFrom:Number = 1;
public var scaleTo:Number = 0.0002;
override public function getAffectedProperties():Array {
return [];
}
override protected function initInstance(inst:IEffectInstance):void {
super.initInstance(inst);
MosaicInstance(inst).scaleFrom = scaleFrom;
MosaicInstance(inst).scaleTo = scaleTo;
}
}
}
package {
import cn.riahome.filters.DisplayObjectFilter;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import mx.core.Container;
import mx.effects.Tween;
import mx.effects.effectClasses.TweenEffectInstance;
public class MosaicInstance extends TweenEffectInstance {
private var mosaicBitmap:Bitmap;
private var orginalBitmapData:BitmapData;
//1 - 0.0001;
public var scaleFrom:Number;
public var scaleTo:Number;
public function MosaicInstance(target:Object) {
super(target);
this.target = target;
}
override public function play():void {
super.play();
initMosaicBitmap();
var tween:Tween = createTween(this, scaleFrom, scaleTo, duration);
}
override public function onTweenUpdate(val:Object):void {
mosaicBitmap.bitmapData = DisplayObjectFilter.mosaicFilter2(new Bitmap(orginalBitmapData),Number(val));
}
override public function onTweenEnd(val:Object):void {
super.onTweenEnd(val);
removeMosaicBitmap();
}
private function initMosaicBitmap():void {
orginalBitmapData = new BitmapData(target.width,target.height,true,0);
orginalBitmapData.draw(target as DisplayObject);
mosaicBitmap = new Bitmap(orginalBitmapData);
if(target is Container) {
target.rawChildren.addChild(mosaicBitmap);
}
else {
target.addChild(mosaicBitmap);
}
}
private function removeMosaicBitmap():void {
if (target is Container)
target.rawChildren.removeChild(mosaicBitmap);
else {
target.removeChild(mosaicBitmap);
}
mosaicBitmap.bitmapData.dispose();
mosaicBitmap.bitmapData = null;
mosaicBitmap = null;
orginalBitmapData = null;
}
}
}
- 大小: 123.3 KB
分享到:
相关推荐
matlab开发-mosaic。从图像数据库创建彩色照片。
envi_mosaic技术处理方法和过程,Seamless Mosaic Mosaic Tutorial: Simple Workflow Mosaic Tutorial: Advanced Workflow Use the Seamless Mosaic workflow to mosaic georeferenced images into one image....
nv21的mosaic有bug,边缘处有bug
Mosaic数据增强返回图片和xml文件,修改自https://blog.csdn.net/wilbur520/article/details/107760805。 使用过程中标签有问题,进行了修改。
ERP Mosaic.ERP大型系统 Mosaic.ERP大型系统
人工智能训练数据增强Mosaic Mixup 1、test_load_mosaic_mixup,使用mosaic_mixup方法增强数据; 2、test_replace_black_block,替换混合增强数据中的黑色块 └── test_thread_fun ,多线程进行替换 └── test_...
mosaic_utils.py
Mosaic ERP大型系统v6.09
C#编程 图形图像及打印 Mosaic(源码)C#编程 图形图像及打印 Mosaic(源码)C#编程 图形图像及打印 Mosaic(源码)C#编程 图形图像及打印 Mosaic(源码)C#编程 图形图像及打印 Mosaic(源码)C#编程 图形图像及打印 Mosaic...
mosaic方法实现图像融合,本方法实用matlab实现两幅图片进行融合
matlab code for mosaic feature extraction
matlab开发-imagemosaic。一本关于形象的书
Mosaic_Batch_V5.3_S1.zip,包含mosaic_batch.sav,拷贝到C:\Program Files\Exelis\ENVI53\extensions,重新启动 ENVI。
Mosaic用于构建用户界面的前端JavaScript库
ENVI IDL编程 图像镶嵌批处理 图像镶嵌批处理
Mosaic ERP大型系统 v6.09.rar,delphi开发,仅供参考。
图像拼接 采用相位相关进行重叠区域预处理
Mosaic-based navigation for autonomous underwater vehicles
Abstract— Panoramic image mosaic is a technology to match a series of images which are overlapped with each other. Panoramic image mosaics can be used for different applications. Image mosaic has ...