Click here to Skip to main content
15,921,697 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Convert grayscale to monochrome Pin
Chris Losinger14-Jan-05 12:24
professionalChris Losinger14-Jan-05 12:24 
GeneralRe: Convert grayscale to monochrome Pin
lastdays15-Jan-05 0:34
lastdays15-Jan-05 0:34 
GeneralPassing arrays to different dialogs Pin
dlarkin7714-Jan-05 8:46
dlarkin7714-Jan-05 8:46 
GeneralRe: Passing arrays to different dialogs Pin
David Crow14-Jan-05 9:26
David Crow14-Jan-05 9:26 
Generalbinary file reading Pin
bwagz14-Jan-05 6:20
bwagz14-Jan-05 6:20 
GeneralRe: binary file reading Pin
Antony M Kancidrowski14-Jan-05 6:57
Antony M Kancidrowski14-Jan-05 6:57 
GeneralRe: binary file reading Pin
bwagz14-Jan-05 7:09
bwagz14-Jan-05 7:09 
GeneralRe: binary file reading Pin
Antony M Kancidrowski14-Jan-05 15:11
Antony M Kancidrowski14-Jan-05 15:11 
You may want to read up on Big Endian and Little Endian byte order for number representation.

Intel Processors are Little Endian (PCs) Motorola Processors are Big Endian. Depending on how the file was created and on what operating system it could be stored either way.

Little Endian is LSB then MSB. Big Endian is MSB then LSB.

e.g. The hex value 0x7FFF when stored in:
Little Endian = FF 7F
Big Endian = 7F FF
within the file.


Note: Network packets have numbers stored in Big Endian no matter what OS originated them.

I would suggest reading the raw data into a buffer then looking at the buffer contents (2-bytes at a time). You may be able to analyse why the numbers are not showing as you expect.

Note: For a signed short(2-byte integer) the positive values will be 0x0000..0x7FFF and the negative values are 0x8000..0xFFFF.


Ant.

I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)

GeneralRe: binary file reading Pin
White Owl14-Jan-05 10:00
White Owl14-Jan-05 10:00 
GeneralHelp IM gonna fail me course at college if i get no help Pin
Member 165528414-Jan-05 5:53
Member 165528414-Jan-05 5:53 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
charlieg14-Jan-05 6:03
charlieg14-Jan-05 6:03 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
David Crow14-Jan-05 9:07
David Crow14-Jan-05 9:07 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
alex.barylski14-Jan-05 18:26
alex.barylski14-Jan-05 18:26 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
Malcolm Smart15-Jan-05 7:36
Malcolm Smart15-Jan-05 7:36 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
Branislav14-Jan-05 22:16
Branislav14-Jan-05 22:16 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
Member 165528416-Jan-05 10:43
Member 165528416-Jan-05 10:43 
GeneralLoadBitmap results in Assertion at AfxMakeResourceHandle Pin
greekgoddj14-Jan-05 5:39
greekgoddj14-Jan-05 5:39 
GeneralRe: LoadBitmap results in Assertion at AfxMakeResourceHandle Pin
greekgoddj14-Jan-05 5:51
greekgoddj14-Jan-05 5:51 
GeneralRe: LoadBitmap results in Assertion at AfxMakeResourceHandle Pin
Chris Losinger14-Jan-05 12:25
professionalChris Losinger14-Jan-05 12:25 
GeneralRe: LoadBitmap results in Assertion at AfxMakeResourceHandle Pin
greekgoddj16-Jan-05 22:12
greekgoddj16-Jan-05 22:12 
GeneralRe: LoadBitmap results in Assertion at AfxMakeResourceHandle Pin
greekgoddj17-Jan-05 0:32
greekgoddj17-Jan-05 0:32 
GeneralCreating XML Schema in VS.NET... Pin
anderslundsgard14-Jan-05 4:39
anderslundsgard14-Jan-05 4:39 
GeneralCString cutting off my string Pin
Wheatbread14-Jan-05 4:21
Wheatbread14-Jan-05 4:21 
GeneralRe: CString cutting off my string Pin
Chris Losinger14-Jan-05 8:04
professionalChris Losinger14-Jan-05 8:04 
GeneralWeird <= operation Pin
alex120514-Jan-05 4:08
alex120514-Jan-05 4:08 

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.