diff options
author | Andrew Mahone <andrew.mahone@gmail.com> | 2009-05-04 15:46:41 +0000 |
---|---|---|
committer | Andrew Mahone <andrew.mahone@gmail.com> | 2009-05-04 15:46:41 +0000 |
commit | 20f76d61ae58bd47b647d79e40beebbbe747e480 (patch) | |
tree | d37569a127b02fdd051c6a3da77c70ac2d72e8ab /apps/plugins/lib/read_image.c | |
parent | dfb24d6ceee703361b8120d689d8d77cfc15830d (diff) | |
download | rockbox-20f76d61ae58bd47b647d79e40beebbbe747e480.tar.gz rockbox-20f76d61ae58bd47b647d79e40beebbbe747e480.zip |
Make JPEG and BMP scaler optional with HAVE_JPEG and HAVE_BMP_SCALING, both defined for all targets that have HAVE_ALBUMART. Disable JPEG in PictureFlow and pluginlib album art search with 32KiB plugin buffer until PictureFlow
gets overlay support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20851 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/read_image.c')
-rw-r--r-- | apps/plugins/lib/read_image.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/apps/plugins/lib/read_image.c b/apps/plugins/lib/read_image.c index 8b6d784213..5b07882764 100644 --- a/apps/plugins/lib/read_image.c +++ b/apps/plugins/lib/read_image.c | |||
@@ -28,12 +28,10 @@ | |||
28 | int read_image_file(const char* filename, struct bitmap *bm, int maxsize, | 28 | int read_image_file(const char* filename, struct bitmap *bm, int maxsize, |
29 | int format, const struct custom_format *cformat) | 29 | int format, const struct custom_format *cformat) |
30 | { | 30 | { |
31 | #if LCD_DEPTH > 1 | ||
32 | int namelen = rb->strlen(filename); | 31 | int namelen = rb->strlen(filename); |
33 | if (rb->strcmp(filename + namelen - 4, ".bmp")) | 32 | if (rb->strcmp(filename + namelen - 4, ".bmp")) |
34 | return read_jpeg_file(filename, bm, maxsize, format, cformat); | 33 | return read_jpeg_file(filename, bm, maxsize, format, cformat); |
35 | else | 34 | else |
36 | #endif | ||
37 | return scaled_read_bmp_file(filename, bm, maxsize, format, cformat); | 35 | return scaled_read_bmp_file(filename, bm, maxsize, format, cformat); |
38 | } | 36 | } |
39 | 37 | ||
@@ -46,11 +44,9 @@ int read_image_file_offset(int offset, const char* filename, struct bitmap *bm, | |||
46 | return fd; | 44 | return fd; |
47 | if (offset != rb->lseek(fd, offset, SEEK_SET)) | 45 | if (offset != rb->lseek(fd, offset, SEEK_SET)) |
48 | return -1; | 46 | return -1; |
49 | #if LCD_DEPTH > 1 | ||
50 | int namelen = rb->strlen(filename); | 47 | int namelen = rb->strlen(filename); |
51 | if (rb->strcmp(filename + namelen - 4, ".bmp")) | 48 | if (rb->strcmp(filename + namelen - 4, ".bmp")) |
52 | return read_jpeg_fd(fd, bm, maxsize, format, cformat); | 49 | return read_jpeg_fd(fd, bm, maxsize, format, cformat); |
53 | else | 50 | else |
54 | #endif | ||
55 | return scaled_read_bmp_fd(fd, bm, maxsize, format, cformat); | 51 | return scaled_read_bmp_fd(fd, bm, maxsize, format, cformat); |
56 | } | 52 | } |