BufferedImage bufferedImage = ImageIO.read(new File("/...icon.jpg"));
// this writes the bufferedImage into a byte array called resultingBytes
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
ImageIO.write(bufferedImage, "jpg", byteArrayOut);
byte[] resultingBytes = byteArrayOut.toByteArray();
위 코드를 사용하여 JEPG 이미지를 바이트 배열로 가져옵니다. 이 바이트 배열에 정확히 무엇이 있는지 알고 싶습니다. 이 배열에는 파일 헤더 정보 또는 픽셀 값만 포함되어 있습니까? 예를 들어,이 이미지의 색상을 뒤집으려면 어떻게해야할까요? 정말 고마워!java ByteArrayOutputStream 클래스 정보
그래서 어떻게 실제 픽셀 값을 얻을 수 있습니까 ??? –