문제

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