public final Color getColor ( int x , int y ) { int [ ] pixels = ( ( DataBufferInt ) img . getRaster ( ) . getDataBuffer ( ) ) . getData ( ) ; int idx = x + y * width ; return new RGBColor ( ( pixels [ idx ] >> 16 & 0x000000ff ) / 255.0 , ( pixels [ idx ] >> 8 & 0x000000ff ) / 255.0 , ( pixels [ idx ] & 0x000000ff ) / 255.0 , ( pixels [ idx ] >> 24 ) / 255.0 ) ; }
Returns the pixel color of this Image .