Click here to Skip to main content
15,923,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Answer[Message Deleted] Pin
singh.vikas850818-Jun-09 23:06
singh.vikas850818-Jun-09 23:06 
GeneralRe: program in c to convert a Portable graymap(PGM) file into portable bitmap file(PBM) Pin
chandu00418-Jun-09 23:12
chandu00418-Jun-09 23:12 
General[Message Deleted] Pin
singh.vikas850818-Jun-09 23:15
singh.vikas850818-Jun-09 23:15 
GeneralRe: program in c to convert a Portable graymap(PGM) file into portable bitmap file(PBM) Pin
chandu00418-Jun-09 23:21
chandu00418-Jun-09 23:21 
General[Message Deleted] Pin
singh.vikas850818-Jun-09 23:30
singh.vikas850818-Jun-09 23:30 
GeneralRe: program in c to convert a Portable graymap(PGM) file into portable bitmap file(PBM) Pin
chandu00418-Jun-09 23:55
chandu00418-Jun-09 23:55 
GeneralRe: program in c to convert a Portable graymap(PGM) file into portable bitmap file(PBM) Pin
Cedric Moonen18-Jun-09 23:14
Cedric Moonen18-Jun-09 23:14 
GeneralRe: program in c to convert a Portable graymap(PGM) file into portable bitmap file(PBM) Pin
CPallini18-Jun-09 23:22
mveCPallini18-Jun-09 23:22 
singh.vikas8508 wrote:
1.)I have never deal in writing a hexadecimal format. means 0x80.

You probably have to use a binary encoding. Hexadecimal, on the other hand is just a convenient number representation. For instance 0x80 is 128 or 1000000b that means the leftmost pixel ON in your image (that means you've to assign the 128 value to the first byte of your file, i.e. binary encoding).

singh.vikas8508 wrote:
2.)I need to perform logical operation with this hexadecimal formate.

You need just to manipulate byte and bits.

singh.vikas8508 wrote:
3.)How I can insert bits in this format. like this.....as an example.....01100101

As I said before, hex is a convenient numeric representation, for instance you can easily translate this bit pattern in hex (just transform 4 bits at time into an hex digit: 0110->0x6, 0101->0x5 hence 01100101->0x65) that means you should write 0x65 to the file.
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: program in c to convert a Portable graymap(PGM) file into portable bitmap file(PBM) Pin
CPallini18-Jun-09 22:14
mveCPallini18-Jun-09 22:14 
AnswerRe: program in c to convert a Portable graymap(PGM) file into portable bitmap file(PBM) Pin
Stuart Dootson18-Jun-09 22:21
professionalStuart Dootson18-Jun-09 22:21 
QuestionRe: program in c to convert a Portable graymap(PGM) file into portable bitmap file(PBM) Pin
David Crow19-Jun-09 3:01
David Crow19-Jun-09 3:01 
QuestionDisabling the Windows Available Networks Window Pin
Sunil P V18-Jun-09 21:07
Sunil P V18-Jun-09 21:07 
QuestionNeed to call VC++ 9.0 window service in VC++ 6.0. Pin
rana ray18-Jun-09 21:06
rana ray18-Jun-09 21:06 
AnswerRe: Need to call VC++ 9.0 window service in VC++ 6.0. Pin
Stuart Dootson18-Jun-09 22:24
professionalStuart Dootson18-Jun-09 22:24 
AnswerRe: Need to call VC++ 9.0 window service in VC++ 6.0. Pin
Raman Tayal19-Jun-09 0:12
Raman Tayal19-Jun-09 0:12 
GeneralRe: Need to call VC++ 9.0 window service in VC++ 6.0. Pin
rana ray19-Jun-09 20:03
rana ray19-Jun-09 20:03 
QuestionWriteFile API performance abnormal Pin
denghp18-Jun-09 21:00
denghp18-Jun-09 21:00 
AnswerRe: WriteFile API performance abnormal Pin
chandu00418-Jun-09 21:07
chandu00418-Jun-09 21:07 
GeneralRe: WriteFile API performance abnormal Pin
denghp18-Jun-09 21:27
denghp18-Jun-09 21:27 
GeneralRe: WriteFile API performance abnormal Pin
chandu00418-Jun-09 21:36
chandu00418-Jun-09 21:36 
GeneralRe: WriteFile API performance abnormal Pin
denghp18-Jun-09 21:38
denghp18-Jun-09 21:38 
AnswerRe: WriteFile API performance abnormal Pin
Stuart Dootson18-Jun-09 22:32
professionalStuart Dootson18-Jun-09 22:32 
GeneralRe: WriteFile API performance abnormal Pin
denghp18-Jun-09 22:46
denghp18-Jun-09 22:46 
GeneralRe: WriteFile API performance abnormal Pin
chandu00418-Jun-09 22:54
chandu00418-Jun-09 22:54 
GeneralRe: WriteFile API performance abnormal Pin
Stuart Dootson18-Jun-09 22:58
professionalStuart Dootson18-Jun-09 22:58 

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.