Collection of Various Color Matrices for Bitmap Manipulation
I've been messing around a bit with some low-level bitmap manipulation and having been creating some various color matrices to apply to bitmap data to add "filters" (for lack of a better term).
I have seen a number开发者_高级运维 of tutorials online in C# and AS3 about applying various color matrices to bitmaps, but was curious if anyone simply had a collection of these color matrices that map to specific filter styles (black and white, sepia, etc.).
quasimondo did a great job with his colormatrix
see it in action here: http://www.quasimondo.com/archives/000565.php an as3 version here (methods' names are self explanatory :) ) http://www.quasimondo.com/archives/000671.php
maybe you'll be interested in convolution filters ( rather than matrices )
here's a little "explorer" done by Sakri: http://www.sakri.net/blog/2007/06/12/convolutionfilter-explorer/
still those are just 'tools', if you need to look into a given effect, you can try things like : http://msdn.microsoft.com/en-gb/magazine/cc163866.aspx and grab the settings.
the good you have the values, the good thing is that you can inject them and see the result immediately. say you want to perform a Sobel filter ( which convolution matrix is [-1,-2,-1, 0,0,0, 1,2,1 ] and the same rotated 90° ) then you can copy paste the matrix values and try right away :)
精彩评论