diff options
author | Teruaki Kawashima <teru@rockbox.org> | 2010-11-21 13:47:56 +0000 |
---|---|---|
committer | Teruaki Kawashima <teru@rockbox.org> | 2010-11-21 13:47:56 +0000 |
commit | e5b1a7d4237a9006b6c49c9c1c13b292ca4ecf7c (patch) | |
tree | f0b9dd1cba0a4ee70afd8b6da64a05286f76c380 /apps/plugins/imageviewer/image_decoder.h | |
parent | eef21cb18ae4bc7cdf83830554a848e0c733a73d (diff) | |
download | rockbox-e5b1a7d4237a9006b6c49c9c1c13b292ca4ecf7c.tar.gz rockbox-e5b1a7d4237a9006b6c49c9c1c13b292ca4ecf7c.zip |
FS#6321: Universal Image Viewer
This unifies jpeg viewer, png viewer, and bmp viewer to one plugin, image viewer, so that you can navigate through different image formats.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28626 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/imageviewer/image_decoder.h')
-rw-r--r-- | apps/plugins/imageviewer/image_decoder.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/apps/plugins/imageviewer/image_decoder.h b/apps/plugins/imageviewer/image_decoder.h new file mode 100644 index 0000000000..93608b1b9a --- /dev/null +++ b/apps/plugins/imageviewer/image_decoder.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * load image decoder. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #ifndef _IMAGE_DECODER_H | ||
23 | #define _IMAGE_DECODER_H | ||
24 | |||
25 | #include "imageviewer.h" | ||
26 | |||
27 | enum image_type { | ||
28 | IMAGE_UNKNOWN = -1, | ||
29 | IMAGE_BMP = 0, | ||
30 | IMAGE_JPEG, | ||
31 | IMAGE_PNG, | ||
32 | MAX_IMAGE_TYPES | ||
33 | }; | ||
34 | |||
35 | struct loader_info { | ||
36 | enum image_type type; | ||
37 | const struct imgdec_api *iv; | ||
38 | unsigned char* buffer; | ||
39 | size_t size; | ||
40 | }; | ||
41 | |||
42 | enum image_type get_image_type(const char *name); | ||
43 | const struct image_decoder *load_decoder(struct loader_info *loader_info); | ||
44 | void release_decoder(void); | ||
45 | |||
46 | #endif /* _IMAGE_DECODER_H */ | ||