2011-08-23 5 views
1

이미지의 특정 픽셀 색상을 어떻게 확인할 수 있습니까? Getting and Setting Pixels in a Buffered Image이미지 파일의 픽셀 색상 식별

// Get a pixel 
int rgb = bufferedImage.getRGB(x, y); 

// Get all the pixels 
int w = bufferedImage.getWidth(null); 
int h = bufferedImage.getHeight(null); 
int[] rgbs = new int[w*h]; 
bufferedImage.getRGB(0, 0, w, h, rgbs, 0, w); 

당신은 또한 bufferedImage.getRaster().getPixel(...) 방법으로 갈 수 있습니다
메신저를 찾고 무엇의 예를 들어 구글에서이 link

답변

1

첫 번째 히트에서 PNG 파일에서지도를 생성합니다.