summaryrefslogtreecommitdiff
path: root/apps/plugins/imageviewer/bmp
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/imageviewer/bmp')
-rw-r--r--apps/plugins/imageviewer/bmp/bmp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/plugins/imageviewer/bmp/bmp.c b/apps/plugins/imageviewer/bmp/bmp.c
index f7e55dbe62..019c4982d3 100644
--- a/apps/plugins/imageviewer/bmp/bmp.c
+++ b/apps/plugins/imageviewer/bmp/bmp.c
@@ -100,8 +100,10 @@ static int img_mem(int ds)
100} 100}
101 101
102static int load_image(char *filename, struct image_info *info, 102static int load_image(char *filename, struct image_info *info,
103 unsigned char *buf, ssize_t *buf_size) 103 unsigned char *buf, ssize_t *buf_size,
104 int offset, int filesize)
104{ 105{
106 (void)filesize;
105 int w, h; /* used to center output */ 107 int w, h; /* used to center output */
106 long time; /* measured ticks */ 108 long time; /* measured ticks */
107 int fd; 109 int fd;
@@ -127,6 +129,11 @@ static int load_image(char *filename, struct image_info *info,
127 rb->splashf(HZ, "err opening %s: %d", filename, fd); 129 rb->splashf(HZ, "err opening %s: %d", filename, fd);
128 return PLUGIN_ERROR; 130 return PLUGIN_ERROR;
129 } 131 }
132 if (offset)
133 {
134 rb->lseek(fd, offset, SEEK_SET);
135 }
136
130 int ds = 1; 137 int ds = 1;
131 /* check size of image needed to load image. */ 138 /* check size of image needed to load image. */
132 size = scaled_read_bmp_fd(fd, &bmp, 0, format | FORMAT_RETURN_SIZE, cformat); 139 size = scaled_read_bmp_fd(fd, &bmp, 0, format | FORMAT_RETURN_SIZE, cformat);