Results 1 to 2 of 2
  1. #1
    hemant is offline Member
    Join Date
    Jul 2008
    Rep Power

    Question 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?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    How is this related to java programming?
    there must be some doc somewhere that defines the format of a jpeg image file.

Similar Threads

  1. how to display uploaded jpeg in jsp(its urgent)
    By shaktish in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 02-17-2009, 02:52 PM
  2. Byte Array
    By sandor in forum New To Java
    Replies: 12
    Last Post: 01-15-2009, 03:31 AM
  3. Reading/Writing a File using byte array
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-16-2008, 10:41 AM
  4. adjacent repeating letters
    By artemis_r2 in forum New To Java
    Replies: 1
    Last Post: 11-17-2007, 04:48 AM
  5. Simplest way to read and display a jpeg image
    By Hasan in forum New To Java
    Replies: 1
    Last Post: 05-31-2007, 03:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts