Turning a color bmp to grayscale:
<p>I've seen this code on the web:</p>

<pre><code>Bitmap grayscaleBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); 

Canvas c = new Canvas(grayscaleBitmap); 
Paint p = new Paint(); 
ColorMatrix cm = new ColorMatrix(); 

cm.setSaturation(0); 
ColorMatrixColorFilter filter = new ColorMatrixColorFilter(cm); 
p.setColorFilter(filter);  
c.drawBitmap(bmp, 0, 0, p); 
</code></pre>

<p>My questions are:
1.  Is 'bmp' supposed to be the color bitmap I want to affect?
2.  How do I get the 0-255 value of the grayscale?</p>

<p>Thanks.</p>
