I have a big image block of the software is used to give, this is roughly like
Now there is a problem, I will take the picture above the red box in the first block of data, this have encapsulated by a DLL interface to, but it was to other algorithms, his interface is designed so
BYTE * StretchData the RECT (rt);
Taken out? That is to say the area is already give you the grey value of the drawing finished, originally pour a nothing important also, but later added a demand, need to put the picture form output to the memory, and I will a new fast memory BYTE to stretch, is roughly such,
Int * pucBuffer=new int [lBufferSize]; For (long long I=0; i { PucBuffer [I]=RGB (bVal [I], bVal [I], bVal [I]); }
Results a this bird toys
Obviously two problems, one is my drawing is wrong, the second is the picture down, guess BMP storage starting point does not agree with the way he BYTE * memory, his things from the top left corner and the BMP seems right
Here for a period of the BYTE array can be saved as a BMP code,
CodePudding user response:
Under the correct pictures for BMP like the bottom left,
CodePudding user response:
Originally is at the bottom of the first line in the DIB
CodePudding user response:
http://blog.csdn.net/why_up/article/details/12625389 Save BMP with this code