Guest User

Untitled

a guest
Jun 24th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. Index: apps/recorder/bmp.c
  2. ===================================================================
  3. --- apps/recorder/bmp.c (revision 21072)
  4. +++ apps/recorder/bmp.c (working copy)
  5. @@ -460,6 +460,7 @@
  6. int read_width;
  7. int depth, numcolors, compression, totalsize;
  8. int ret;
  9. + bool return_size = format & FORMAT_RETURN_SIZE;
  10.  
  11. unsigned char *bitmap = bm->data;
  12. struct uint8_rgb palette[256];
  13. @@ -595,6 +596,9 @@
  14. else
  15. totalsize = BM_SIZE(bm->width,bm->height,format,remote);
  16.  
  17. + if(return_size)
  18. + return totalsize;
  19. +
  20. /* Check if this fits the buffer */
  21. if (totalsize > maxsize) {
  22. DEBUGF("read_bmp_fd: Bitmap too large for buffer: "
  23. Index: firmware/export/lcd.h
  24. ===================================================================
  25. --- firmware/export/lcd.h (revision 21072)
  26. +++ firmware/export/lcd.h (working copy)
  27. @@ -388,6 +388,7 @@
  28. #define FORMAT_REMOTE 0x10000000
  29. #define FORMAT_RESIZE 0x08000000
  30. #define FORMAT_KEEP_ASPECT 0x04000000
  31. +#define FORMAT_RETURN_SIZE 0x02000000
  32.  
  33. #define TRANSPARENT_COLOR LCD_RGBPACK(255,0,255)
  34. #define REPLACEWITHFG_COLOR LCD_RGBPACK(0,255,255)
Add Comment
Please, Sign In to add comment