Click here to Skip to main content
15,921,210 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Questions about reading binary files Pin
Mark Salsbery29-Sep-07 8:22
Mark Salsbery29-Sep-07 8:22 
GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 8:52
GentooGuy29-Sep-07 8:52 
GeneralRe: Questions about reading binary files Pin
Luc Pattyn29-Sep-07 9:15
sitebuilderLuc Pattyn29-Sep-07 9:15 
GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 9:20
GentooGuy29-Sep-07 9:20 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery29-Sep-07 9:16
Mark Salsbery29-Sep-07 9:16 
GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 9:20
GentooGuy29-Sep-07 9:20 
GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 10:27
GentooGuy29-Sep-07 10:27 
GeneralRe: Questions about reading binary files Pin
GentooGuy29-Sep-07 10:52
GentooGuy29-Sep-07 10:52 
I'm sorry, but I still think they're swapped.
My reason for this is the fact that I'm looking up 0x9003, which is a tag in a JPEG file indicating the date of the picture.
When using 'od', I see this:
<br />
$ od -x file.jpg  | grep 9003<br />
0000520      0004    0000    3230    3030    9003    0002    0014    0000<br />

This is the only occurence of '9003' in a file which does contain the information (so this must be the instance I'm looking for).
But, when running my program, and printing some lines, I get this output:
<br />
4<br />
0<br />
0<br />
0<br />
30<br />
32<br />
30<br />
30<br />
3<br />
90<br />
2<br />
0<br />
14<br />
0<br />


This is produced by the loop you've proposed. When comparing both outputs, I see this one has the bytes swapped when compared to od and (!) the exif standard. So I guess, od isn't wrong. Or am I indeed wrong?
GeneralRe: Questions about reading binary files [modified*2] Pin
Mark Salsbery29-Sep-07 11:08
Mark Salsbery29-Sep-07 11:08 
GeneralRe: Questions about reading binary files [modified*2] Pin
GentooGuy30-Sep-07 2:40
GentooGuy30-Sep-07 2:40 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery30-Sep-07 6:31
Mark Salsbery30-Sep-07 6:31 
GeneralRe: Questions about reading binary files Pin
GentooGuy30-Sep-07 6:37
GentooGuy30-Sep-07 6:37 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery30-Sep-07 6:47
Mark Salsbery30-Sep-07 6:47 
GeneralRe: Questions about reading binary files Pin
GentooGuy30-Sep-07 6:55
GentooGuy30-Sep-07 6:55 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery30-Sep-07 7:10
Mark Salsbery30-Sep-07 7:10 
GeneralRe: Questions about reading binary files Pin
GentooGuy30-Sep-07 14:51
GentooGuy30-Sep-07 14:51 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery29-Sep-07 11:11
Mark Salsbery29-Sep-07 11:11 
GeneralRe: Questions about reading binary files Pin
Mark Salsbery29-Sep-07 11:22
Mark Salsbery29-Sep-07 11:22 
GeneralRe: Questions about reading binary files Pin
Luc Pattyn29-Sep-07 11:49
sitebuilderLuc Pattyn29-Sep-07 11:49 
AnswerRe: Questions about reading binary files Pin
Luc Pattyn30-Sep-07 4:31
sitebuilderLuc Pattyn30-Sep-07 4:31 
QuestionC++ Byte Level Code.. [modified] Pin
spalanivel27-Sep-07 21:26
spalanivel27-Sep-07 21:26 
AnswerRe: C++ Byte Level Code.. Pin
led mike28-Sep-07 5:19
led mike28-Sep-07 5:19 
GeneralRe: C++ Byte Level Code.. Pin
spalanivel2-Oct-07 5:24
spalanivel2-Oct-07 5:24 
QuestionSimple ESC Key Pin
Michael10127-Sep-07 18:18
Michael10127-Sep-07 18:18 
AnswerRe: Simple ESC Key Pin
Luc Pattyn28-Sep-07 7:44
sitebuilderLuc Pattyn28-Sep-07 7:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.