urgent please.what do 4 repeating fields in byte array of jpeg specify?
i have a jpeg image that is completely red. i used BufferedImage to construct its object and then used getRGB(i,j) to get values at all the pixel locations.
displaying in binary formatting gave me the 24 bit repeating integer
11101101 00011011 00100100
then i used ImageIO with format "jpg" to write to ByteArrayOutputStream and then convert it to byte array. and again printed array values . now that gives me these 4 bytes repeating.
first of all how could the byte value change.
second where did the fourth byte come from? it should be only rgb.
also please tell me which of the bytes is red ,green and blue?