Friday, 23 April 2021

Placing an image in the transparent area of another image android

I am trying to replace transparent area of a Frame Image with another image and i only want to replace that transparent area with my other image. This is what i do getting the transparent pixels from the bitmap of the frame and storing it. But its not working.

 for (int x = 0; x < imgBitmap.getWidth(); x++)
    {
        for (int y = 0; y < imgBitmap.getHeight(); y++)
        {
            if (imgBitmap.getPixel(x, y) == Color.TRANSPARENT)
            {
                bottomX[i] = x;
                bottomY[i] = y;
                break;
            }
        }
    }

Below is the transparent frame i am using. Transparent Frame image

As i mentioned above i want to fill the transparent area with another image?
Any help or guide will be appreciated Thanks!



from Placing an image in the transparent area of another image android

No comments:

Post a Comment