[android-developers] Re: Setting each pixel quickly?

2010-04-01 Thread Streets Of Boston
Google this: ColorMatrix threshold Here is a link that may be useful: http://keywon.com/wiki/index.php?title=ColorMatrix Draw your bitmap (newBitmap) into a bitmap-backed canvas (c) that has a ColorMatrixColorFilter set with a ColorMatrix that represents a so- called 'threshold' filter (see

[android-developers] Re: Setting each pixel quickly?

2010-04-01 Thread Kevin Huber
You should work on the array of pixel data directly. This document may be helpful http://www.3programmers.com/mwells/documents/pdf/Final%20Report.pdf I don't think the comparison you are doing if (point Color.GRAY) is valid since Bitmap pixels are ARGB data. I would expect to see code bit

[android-developers] Re: Setting each pixel quickly?

2010-04-01 Thread Kevin Huber
The title of the PDF is Mobile Image Processing on the Google Phone with the Android Operating System by Michael T. Wells On Apr 1, 4:55 pm, Kevin Huber kevin.hu...@gmail.com wrote: You should work on the array of pixel data directly. This document may be

[android-developers] Re: Setting each pixel quickly?

2010-04-01 Thread paladin
I think I should have mentioned that I already had desaturated the image. So the color comparison is correct. On Apr 1, 5:55 pm, Kevin Huber kevin.hu...@gmail.com wrote: You should work on the array of pixel data directly. This document may be

[android-developers] Re: Setting each pixel quickly?

2010-04-01 Thread Kevin Huber
On my N1, it was about 4x faster to use ColorMatrix. Bitmap image = BitmapFactory.decodeResource(this.getResources(), R.drawable.testimage); Paint paint = new Paint(); int width = image.getWidth(); int height = image.getHeight();