Hello,
i am using emWin in one of our µ-Controller Projects. I try to make a 'screenshot' of the GUI using the following Code:
Display All
However, i can't get a working screenshot. Am i doing something wrong here? While debugging i also saw that 'Data' ist just 0x00 most of the time. Is this correct?!
Hope someone can help me with this.
Thanks in advance and kind Regards
i am using emWin in one of our µ-Controller Projects. I try to make a 'screenshot' of the GUI using the following Code:
C Source Code
- char buffer[100];
- int counter;
- static void _WriteByte2File(U8 Data, void * p)
- {
- FILE* bmpFile;
- bmpFile = (FILE*) p;
- buffer[counter] = Data;
- counter++;
- if (counter == 100)
- {
- fwrite(&buffer, sizeof(U8), counter, bmpFile);
- fflush(bmpFile);
- counter = 0;
- }
- }
- static void vMakeScreenshot()
- {
- FILE * bmpFile;
- counter = 0;
- bmpFile = fopen( "M0:\\temp\\temp.bmp", "w" );
- GUI_BMP_SerializeExBpp( _WriteByte2File, 320, 240, 50, 50, bmpFile, 16);
- // Write rest of buffer
- fwrite(&buffer, sizeof(U8), counter, bmpFile);
- fflush(bmpFile);
- fclose(bmpFile);
- }
However, i can't get a working screenshot. Am i doing something wrong here? While debugging i also saw that 'Data' ist just 0x00 most of the time. Is this correct?!
Hope someone can help me with this.
Thanks in advance and kind Regards
The post was edited 3 times, last by kain2609 ().