diff options
author | Roman Artiukhin <bahusdrive@gmail.com> | 2024-10-14 21:33:40 +0300 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2024-10-28 12:46:51 -0400 |
commit | 55a5bfe7409677a26437651798abbc6d87b56089 (patch) | |
tree | 7ab7d96f52ee15257b174e75f15abae1f09b74cf /apps/plugins/imageviewer/bmp | |
parent | c1bcebd9986b1e2120fd05ead67754d444dae7d3 (diff) | |
download | rockbox-55a5bfe7409677a26437651798abbc6d87b56089.tar.gz rockbox-55a5bfe7409677a26437651798abbc6d87b56089.zip |
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
Diffstat (limited to 'apps/plugins/imageviewer/bmp')
-rw-r--r-- | apps/plugins/imageviewer/bmp/bmp.c | 9 |
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 | ||
102 | static int load_image(char *filename, struct image_info *info, | 102 | static 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); |