hi
        if you are using bitmap, use an integer array to store the bitmap.
use bitmap.getPixel() to get the corresponding bitmap in integer array. By
using bitwise rotation operation, we will get RGB values. (Also byte array
can be used). See the code below.

             int[] pix = new int[picw * pich];
            bitmap.getPixels(pix, 0, picw, 0, 0, picw, pich);

            int R, G, B,Y;

            for (int y = 0; y < pich; y++)
            for (int x = 0; x < picw; x++)
                {
                int index = y * picw + x;
                int R = (pix[index] >> 16) & 0xff;     //bitwise shifting
                int G = (pix[index] >> 8) & 0xff;
                int B = pix[index] & 0xff;

                //R,G.B - Red, Green, Blue
                 //to restore the values after RGB modification, use //next
statement
                pix[index] = 0xff000000 | (R << 16) | (G << 8) | B;
                }



Thanks and Regards,

Andarena Vootog
Vootog Information Systems <http://www.vootog.com> Pvt Ltd.

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to