Click to See Complete Forum and Search --> : open binary files
april
May 13th, 1999, 12:58 PM
hi...hope someone can help....
i'm writing a program that needs to open binary files of some images. i've tried file.read, fopen and some other functions. however, i don't know how can i display the opened files on the screen for the user to view. anyone has any advice ?
Michael Decker
May 13th, 1999, 01:03 PM
What image format (.bmp, .jpg, etc...) are the files? You need to know how to interpret the binary data.
april
May 13th, 1999, 01:18 PM
dear Michael,
the format is .bin
my friend said there are a few formats for .bin files and i need to know which format it is in order to process it. is this true ?
Michael Decker
May 13th, 1999, 01:31 PM
April,
Unfortunately, I'm not sure that ".bin" tells you a whole lot about what kind of image format that file might contain. I don't recognize that as a standard image file extension. Generally, ".bin" is used simply to say that it contains binary data. Its not an indication of how to interpret the data. You and I can write binary files containing anything and give it a ".bin" extension.
Yes, it is true that you need to know the format in order to interpret the binary data within the file.
Is it some kind of "in-house" format that you may be using?
april
May 13th, 1999, 01:44 PM
hi Michael,
i'm actually writing a program that opens binary files which : ( these are all that i know about the binary files ) :
an image is captured and its pixels values are stored into an unsigned int 256*256 buffer.
this buffer is then saved as a binary file.
Michael Decker
May 13th, 1999, 01:51 PM
April,
Is that the size of the image (256 wide X 256 high)?
Do you have an example file that I could look at?
Michael...
mdecker@kodak.com
april
May 13th, 1999, 01:59 PM
dear Michael,
the image is 256pixels * 256pixels.
i'll send you an image tomorrow ( Singapore time 10 - 11 am ). now is Singapore time 2:45 am
thanx.
Michael Decker
May 13th, 1999, 02:06 PM
Go To Bed!!!
Michael Decker
May 13th, 1999, 02:23 PM
April,
Since you're 12 hours ahead of me, send the file to my work and home. Maybe I can look at it before I go to bed tonight.
mdecker@kodak.com
mdecker@frontiernet.net
Thanks!
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.