Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSize of memory pointed to by void * pointer. Pin
VC++Maniac12-Dec-08 1:00
VC++Maniac12-Dec-08 1:00 
AnswerRe: Size of memory pointed to by void * pointer. Pin
Naveen12-Dec-08 1:16
Naveen12-Dec-08 1:16 
AnswerRe: Size of memory pointed to by void * pointer. Pin
Jijo.Raj12-Dec-08 1:18
Jijo.Raj12-Dec-08 1:18 
GeneralRe: Size of memory pointed to by void * pointer. Pin
VC++Maniac12-Dec-08 1:38
VC++Maniac12-Dec-08 1:38 
GeneralRe: Size of memory pointed to by void * pointer. Pin
Jijo.Raj12-Dec-08 2:08
Jijo.Raj12-Dec-08 2:08 
GeneralRe: Size of memory pointed to by void * pointer. Pin
VC++Maniac12-Dec-08 2:14
VC++Maniac12-Dec-08 2:14 
QuestionHow to write BITMAP structure to xml file? Pin
VC++Maniac12-Dec-08 0:57
VC++Maniac12-Dec-08 0:57 
AnswerRe: How to write BITMAP structure to xml file? Pin
enhzflep12-Dec-08 14:17
enhzflep12-Dec-08 14:17 
However the hell you want!!?!

Define the structure you'll use to store the info, then fill it - simple.

If you need a prod-along, why not just make the XML file hold ( a subset of) the same info as the BMP file would, in the same order.

E.g for a 5x5 pixel red square, I may use something like:

<BitmapFile>
<FileInfo>
<Width>5</Width>
<Height>5</Height>
<BitPlanes>1</BitPlanes>
<BitsPixel>24</BitPixel>
<CompressionType>0</CompressionType>
<xPixelsMeter>2835</xPixelsMeter>
<yPixelsMeter>2835</yPixelsMeter>
<ColsUsed>0</ColsUsed>
<ColsImportant>0</ColsImportant>
</FileInfo>
<ColorData>
<ScanLine> FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 </ScanLine>
<ScanLine> FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 </ScanLine>
<ScanLine> FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 </ScanLine>
<ScanLine> FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 </ScanLine>
<ScanLine> FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 </ScanLine>
</ColorData>
<BitmapFile>


One of the many problems with his approach is, that I can't remember if compressed pixels runs are allowed to cross scanLine boundaries (one compressed stream may not end at the end of the scanline it was begun in)

Please excuse me if it's a little forward, but why don't you use ZLib? Instead of busting up all the files for transfer and storing the info into a single large XML file, you could just compress the files together into an archive, and send that. This should provide you with smaller transfers & faster execution since the files are all binary rather than textual representations of the same binary data.
GeneralRe: How to write BITMAP structure to xml file? Pin
VC++Maniac12-Dec-08 17:40
VC++Maniac12-Dec-08 17:40 
QuestionFont problem Pin
trioum12-Dec-08 0:53
trioum12-Dec-08 0:53 
QuestionRe: Font problem Pin
CPallini12-Dec-08 0:58
mveCPallini12-Dec-08 0:58 
AnswerRe: Font problem Pin
trioum12-Dec-08 1:17
trioum12-Dec-08 1:17 
GeneralRe: Font problem Pin
CPallini12-Dec-08 1:49
mveCPallini12-Dec-08 1:49 
GeneralRe: Font problem Pin
trioum14-Dec-08 18:04
trioum14-Dec-08 18:04 
GeneralRe: Font problem Pin
trioum14-Dec-08 18:26
trioum14-Dec-08 18:26 
GeneralRe: Font problem Pin
Hans Dietrich15-Dec-08 6:23
mentorHans Dietrich15-Dec-08 6:23 
QuestionProgress bar ctrl question Pin
josip cagalj12-Dec-08 0:50
josip cagalj12-Dec-08 0:50 
AnswerRe: Progress bar ctrl question Pin
Iain Clarke, Warrior Programmer12-Dec-08 2:50
Iain Clarke, Warrior Programmer12-Dec-08 2:50 
GeneralRe: Progress bar ctrl question Pin
josip cagalj12-Dec-08 3:23
josip cagalj12-Dec-08 3:23 
GeneralRe: Progress bar ctrl question Pin
Iain Clarke, Warrior Programmer12-Dec-08 3:35
Iain Clarke, Warrior Programmer12-Dec-08 3:35 
GeneralRe: Progress bar ctrl question Pin
josip cagalj12-Dec-08 3:42
josip cagalj12-Dec-08 3:42 
GeneralRe: Progress bar ctrl question Pin
josip cagalj14-Dec-08 23:04
josip cagalj14-Dec-08 23:04 
QuestionGet a HBITMAP from a BITMAP structure. Pin
VC++Maniac12-Dec-08 0:24
VC++Maniac12-Dec-08 0:24 
AnswerRe: Get a HBITMAP from a BITMAP structure. Pin
Nishad S12-Dec-08 1:38
Nishad S12-Dec-08 1:38 
GeneralRe: Get a HBITMAP from a BITMAP structure. Pin
VC++Maniac12-Dec-08 1:39
VC++Maniac12-Dec-08 1:39 

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.