Currently browsing tag

color

recolour-image

Code Snippet: Recolour an Image

This method will recolour an image to a new colour. However, it does give a washed out look to the image IMO. package net.avdw.image { import flash.display.BitmapData; import flash.filters.ColorMatrixFilter; import flash.geom.Point; import flash.geom.Rectangle; import net.avdw.color.extractARGB; /** * Makes a bitmap data object the color provided. * * @param destBitmapData The …

sepia-image

Code Snippet: Make a Image Sepia

The below code will convert an image to sepia. package net.avdw.image { import flash.display.BitmapData; import flash.filters.ColorMatrixFilter; import flash.geom.Point; import flash.geom.Rectangle; /** * Makes a bitmap data object sepia. * * @param destBitmapData The destination bitmap data object. * @param sourceBitmapData The source bitmap data where the pixel data is retrieved. …

grayscale-example

Code Snippet: How to Grayscale an Image

The below actionscript snippet will transform an image to grayscale using the ColorMatrixFilter. package net.avdw.image { import flash.display.BitmapData; import flash.filters.ColorMatrixFilter; import flash.geom.Point; import flash.geom.Rectangle; /** * Makes a bitmap data object grayscale. * * @param destBitmapData The destination bitmap data object. * @param sourceBitmapData The source bitmap data where the …