سؤال

i'm trying to dim the alpha channel of individual pixels in a bitmap. i'd like to keep the pixels color rgb but just make the pixel semi transparent. i've looked at the Color class and tried the Color.argb(int,int,int,int) method, but no good. how can i just set the alpha of a pixel whilst keeping the pixel's original rgb as well?

thanks in advance mat.

[edit] lol terrapin:). hi, below is how i configure my bitmap. i have no underlying image if that's what you mean. what i'm trying to do is basically make certain pixels half transparent. i have a bitmap and have placed a circle on the bitmap. i have the algorithim in place that only targets the pixels within the circle and i can change those pixels to say pink. what i'd like is check each pixel in the circle and make it smi transparent, still keeping half the original pixel colour, if that makes sense :)

 bgr.setPixel(i,y,Color.argb(50,255,255,255));

[edit]

BitmapFactory.Options bfo = new BitmapFactory.Options();
        bfo.inSampleSize = 1;

        bm = BitmapFactory.decodeByteArray(imageArray, 0, imageArray.length, bfo);
        bgr = Bitmap.createBitmap(bm.getWidth(), bm.getHeight(), bm.getConfig());
        bgr = bm.copy(bm.getConfig(), true);

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top