mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 19:40:20 +03:00
free image buffer after dump
This commit is contained in:
parent
ddaeff7f65
commit
c61e85d212
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ void dumpImage(const std::string& filename, const BitmapBuffer* dc)
|
||||||
uint8_t * img = (uint8_t *)malloc(pixels * 3);
|
uint8_t * img = (uint8_t *)malloc(pixels * 3);
|
||||||
convert_RGB565_to_RGB888(img, dc->getPixelPtr(0,0), pixels);
|
convert_RGB565_to_RGB888(img, dc->getPixelPtr(0,0), pixels);
|
||||||
stbi_write_png(fullpath.c_str(), dc->width(), dc->height(), 3, img, stride);
|
stbi_write_png(fullpath.c_str(), dc->width(), dc->height(), 3, img, stride);
|
||||||
|
free(img);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool checkScreenshot_colorlcd(const BitmapBuffer* dc, const char* test)
|
bool checkScreenshot_colorlcd(const BitmapBuffer* dc, const char* test)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue