Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2008, 02:15 PM
Member
 
Join Date: Jul 2008
Posts: 3
hemant is on a distinguished road
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.

00101000
10100000
00000010
10001010

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?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-04-2008, 06:39 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: SW MO, USA
Posts: 964
Norm is on a distinguished road
How is this related to java programming?
there must be some doc somewhere that defines the format of a jpeg image file.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Byte Array sandor New To Java 8 08-29-2008 01:28 PM
Reading/Writing a File using byte array Java Tip Java Tips 0 01-16-2008 11:41 AM
how to display uploaded jpeg in jsp(its urgent) shaktish JavaServer Pages (JSP) and JSTL 0 12-28-2007 07:52 AM
adjacent repeating letters artemis_r2 New To Java 1 11-17-2007 05:48 AM
Simplest way to read and display a jpeg image Hasan New To Java 1 05-31-2007 04:42 PM


All times are GMT +3. The time now is 02:21 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org