From 55a5bfe7409677a26437651798abbc6d87b56089 Mon Sep 17 00:00:00 2001 From: Roman Artiukhin Date: Mon, 14 Oct 2024 21:33:40 +0300 Subject: View Album Art from WPS context menu Add ability to imageviewer to view current track embedded/folder album art Add "View Album Art" WPS context menu item Change-Id: I49caebd38e5e3e2910d418bbeaa5e51da0e6bd93 --- apps/plugins/imageviewer/bmp/bmp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps/plugins/imageviewer/bmp/bmp.c') 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) } static int load_image(char *filename, struct image_info *info, - unsigned char *buf, ssize_t *buf_size) + unsigned char *buf, ssize_t *buf_size, + int offset, int filesize) { + (void)filesize; int w, h; /* used to center output */ long time; /* measured ticks */ int fd; @@ -127,6 +129,11 @@ static int load_image(char *filename, struct image_info *info, rb->splashf(HZ, "err opening %s: %d", filename, fd); return PLUGIN_ERROR; } + if (offset) + { + rb->lseek(fd, offset, SEEK_SET); + } + int ds = 1; /* check size of image needed to load image. */ size = scaled_read_bmp_fd(fd, &bmp, 0, format | FORMAT_RETURN_SIZE, cformat); -- cgit v1.2.3