Provide a quick, creative biography in 140 characters or less.
More bioYou can make an image transparent using 5,6 lines of code in java.
The effect of the tranparency still depends on how the image is.In general case the border which you specified can be removed by simply checking the rgb value of the border colour and transparenting
that colour.
I am attaching a samlpe code which do the transparency!!!
class fff extends RGBImageFilter {
int opacity = 0;
public int filterRGB(int x,int y,int rgb)
{ int alpha_channel = ( rgb >> 24) & 0xFF;
alpha_channel = alpha_channel * opacity/255;
return ((rgb&0x00ffffff)|(alpha_c
}
} //XXXXYYYYRRRRRRRRGGGGGGGG
//00000000RRRRRRRRGGGGGGGG
//AAAAAAAA0000000000000000
//AAAAAAAARRRRRRRRGGGGGGGG
The commend shown here shows how the code changes the rgb value of the colour to the transparent equivalent!!!
Good Luck.....