How can I change the bitmapdata of a coloured Bitmap to Black and White in AS3 ?
I’m developing a simple image editor tool for a CMS in flash.
People should be able to switch the colour of the uploaded Bitmap to black and white. I want the bitmapdata itself to change So I can write it to a ByteArray with Adobe’s JPGEncoder Class afterwards.
this would be the most elegant solution i presume (with
sourcebeing youBitmapData):with
flash.geom::Pointandflash.filters::ColorMaxtrixFilter…ColorMatrixFilterallows many things, such as hue shifts, colorisation, lightening, darkening and desaturation and so on … otherwiseBitmapData::paletteMapandBitmapData::colorTransformare good complements …just wanted to note, that using the following
looks a little more natural, since subjectively,
#00FF00is brighter than#FF0000, which in turn is brighter than#0000FFgood luck then … 😉
greetz
back2dos