close

I used to read an image using BuffereedImage method

int pixel=im.getRGB(j,i))&0xFF;

 

and I think it is queit ok; however, after somedays (ok years..... )

 

I WAS WRONG !!!! 

 

OMG the pixel value is not accurate and this is a very serious problem when reading a image

and mulipalating the values .

 

The more correct way to read the 8 bit grayscale image would be 

int p=im.getRaster().getSample(j, i, 0);

using method : getRaster()

arrow
arrow
    文章標籤
    Java image processing
    全站熱搜

    davidctwood 發表在 痞客邦 留言(0) 人氣()