public final void setA ( double alpha , int x , int y ) { int [ ] pixels = ( ( DataBufferInt ) img . getRaster ( ) . getDataBuffer ( ) ) . getData ( ) ; int idx = x + y * width ; int tmpR = pixels [ idx ] >> 16 & 0x000000ff ; int tmpG = pixels [ idx ] >> 8 & 0x000000ff ; int tmpB = pixels [ idx ] & 0x000000ff ; pixels [ idx ] = ( int ) alpha << 24 | tmpR << 16 | tmpG << 8 | tmpB ; }
Sets the alpha value of the pixel data in this Image .