This content has been marked as final. Show 3 replies
it's doable in a.s. 2 using the bitmap class.
Since it's possible in AS2 it's certainly possible in 3. Here's a little
sample that will do vertical edge enhancement... All you need is to import
a bitmap into the library then give it a linkage id to feed to the
loadBitmap method. Hopefully, this is enough to get you started.
If you want to do it the hard way it's easy to write a convolution kernel,
it just won't be as fast. Google 'Sobel' which is the edge detection
algorithm used by Photoshop.
var filter:ConvolutionFilter = new ConvolutionFilter(3, 3,
var bit:BitmapData = BitmapData.loadBitmap("bitmapLinkageID");
var mc:MovieClip = this.createEmptyMovieClip("mc",
bit.applyFilter(bit, bit.rectangle, new Point(0,0), filter);
Adobe Community Expert
Awesome advice, a treat. Thank you very much.
I put this together, and it strips color, finds edges, and inverts. The only thing I'd still like to know on this is how to make it more high contrast once I've gone through the three filters.
These filters are so powerful and marvelous! I know the variables on the saturation section aren't needed, but I kept them as I found them.