Results 1 to 6 of 6
- 11-29-2010, 11:29 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 4
- Rep Power
- 0
- 11-29-2010, 11:43 AM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
An "image" file is a "binary" file. Now what is it you actually want to know?
- 11-29-2010, 12:04 PM #3
Member
- Join Date
- Nov 2010
- Posts
- 4
- Rep Power
- 0
Okay.. Thats right.. But I would like to convert the image file for example, An jpeg file into form of file containing 1 and 0. in other words, i want to see the binary representation of that original file as an input.
- 11-29-2010, 12:08 PM #4
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
So use an FileInputStream and read it byte by byte and use the Integer.toBinaryString method to create the binary representation of that byte (don't forget to left pad zeros to a length of 8 for each and every byte) and then write that back into another file.
- 11-29-2010, 12:40 PM #5
Member
- Join Date
- Nov 2010
- Posts
- 4
- Rep Power
- 0
Thank you.
your reply looks promising. But I am quite new to java, so i am looking into it.
But if u can help me in further detail, that would be of great help to me.
- 11-29-2010, 12:59 PM #6
Member
- Join Date
- Nov 2010
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Image file to Text Conversion
By sureshsoftengg in forum New To JavaReplies: 2Last Post: 09-21-2010, 12:08 PM -
[SOLVED] how to reading binary file and writing txt file
By tOpach in forum New To JavaReplies: 3Last Post: 05-09-2009, 11:31 PM -
Conversion of image object into file
By aartheesrini in forum Java AppletsReplies: 0Last Post: 03-12-2009, 08:09 AM -
image to byte code file conversion
By nupurashi in forum Java TipReplies: 0Last Post: 01-28-2009, 10:25 AM -
Regarding conversion of Image file to Video file
By RamaDeviMsc in forum Advanced JavaReplies: 0Last Post: 06-25-2007, 02:28 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks