summaryrefslogtreecommitdiff
path: root/apps/plugins/imageviewer/gif/gif_decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/imageviewer/gif/gif_decoder.h')
-rw-r--r--apps/plugins/imageviewer/gif/gif_decoder.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/apps/plugins/imageviewer/gif/gif_decoder.h b/apps/plugins/imageviewer/gif/gif_decoder.h
new file mode 100644
index 0000000000..444f54acf9
--- /dev/null
+++ b/apps/plugins/imageviewer/gif/gif_decoder.h
@@ -0,0 +1,37 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (c) 2012 Marcin Bukat
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
18 *
19 ****************************************************************************/
20
21#define GIF_MAX_FRAMES 32
22
23struct gif_decoder {
24 unsigned char *mem;
25 size_t mem_size;
26 int width;
27 int height;
28 int frames_count;
29 int delay;
30 size_t native_img_size;
31 int error;
32};
33
34void gif_decoder_init(struct gif_decoder *decoder, void *mem, size_t size);
35void gif_open(char *filename, struct gif_decoder *d);
36void gif_decode(struct gif_decoder *d, void (*pf_progress)(int current, int total));
37