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画像をバイト配列として取得します。このバイト配列に正確に何が含まれているのか知りたいです。この配列には、ファイルヘッダー情報またはピクセル値のみが含まれていますか?たとえば、この画像の色を反転させたい場合、そのための良い方法は何ですか?本当にありがとう!