[android-developers] Re: Grayscaling

2009-04-20 Thread sm12
Solved. The problem was in the parameters of Color.rgb. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscri

[android-developers] Re: Grayscaling

2009-04-20 Thread sm12
The problem is my Bitmap was immutable. I made it mutable. I also used pixels array. Initially by bitmap is taken from source. Then Im setting it to mutable as follows: mutable = immutable.copy(Config.RGB_565, true); But now, my image is coming "blue-scaled". Why? --~--~-~--

[android-developers] Grayscaling

2009-04-20 Thread sm12
Hi, I am trying to grayscale bitmap as follows, But it is crashing as soon as I run this method. The problem is in last line. How can I assign "int" to "Color"? Or are there any better ways? Thx for(int y = 0; y < imgH; y++) for(int x = 0; x < imgW; x++) { int color = bit