summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/jpeg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c
index 556972f768..be9e4db5e2 100644
--- a/apps/plugins/jpeg.c
+++ b/apps/plugins/jpeg.c
@@ -27,7 +27,7 @@
27#include "plugin.h" 27#include "plugin.h"
28 28
29#ifdef HAVE_LCD_BITMAP /* and also not for the Player */ 29#ifdef HAVE_LCD_BITMAP /* and also not for the Player */
30#include "grayscale.h" 30#include "gray.h"
31 31
32/******************************* Globals ***********************************/ 32/******************************* Globals ***********************************/
33 33
@@ -1754,9 +1754,7 @@ int main(char* filename)
1754 /* initialize the grayscale buffer: 1754 /* initialize the grayscale buffer:
1755 * 112 pixels wide, 8 rows (64 pixels) high, (try to) reserve 1755 * 112 pixels wide, 8 rows (64 pixels) high, (try to) reserve
1756 * 32 bitplanes for 33 shades of gray. (uses 28856 bytes)*/ 1756 * 32 bitplanes for 33 shades of gray. (uses 28856 bytes)*/
1757 align(&buf, &buf_size, 4); // 32 bit align 1757 grayscales = gray_init_buffer(buf, buf_size, 112, 8, 32, &graysize) + 1;
1758 graysize = sizeof(tGraybuf) + sizeof(long) + (112 * 8 + sizeof(long)) * 32;
1759 grayscales = gray_init_buffer(buf, graysize, 112, 8, 32) + 1;
1760 buf += graysize; 1758 buf += graysize;
1761 buf_size -= graysize; 1759 buf_size -= graysize;
1762 if (grayscales < 33 || buf_size <= 0) 1760 if (grayscales < 33 || buf_size <= 0)
@@ -1906,6 +1904,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
1906 1904
1907 rb = api; /* copy to global api pointer */ 1905 rb = api; /* copy to global api pointer */
1908 1906
1907 /* This plugin uses the grayscale framework, so initialize */
1908 gray_init(api);
1909 ret = main((char*)parameter); 1909 ret = main((char*)parameter);
1910 1910
1911 if (ret == PLUGIN_USB_CONNECTED) 1911 if (ret == PLUGIN_USB_CONNECTED)