src/feature/imagemagick/imagemagick-gif-encoder.h (view raw)
1/* Copyright (c) 2013-2015 Jeffrey Pfau
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6#ifndef IMAGEMAGICK_GIF_ENCODER
7#define IMAGEMAGICK_GIF_ENCODER
8
9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#include <mgba/core/interface.h>
14
15#define MAGICKCORE_HDRI_ENABLE 0
16#define MAGICKCORE_QUANTUM_DEPTH 8
17
18#include <wand/MagickWand.h>
19
20struct ImageMagickGIFEncoder {
21 struct mAVStream d;
22 MagickWand* wand;
23 char* outfile;
24 uint32_t* frame;
25
26 unsigned currentFrame;
27 int frameskip;
28 int delayMs;
29
30 unsigned iwidth;
31 unsigned iheight;
32};
33
34void ImageMagickGIFEncoderInit(struct ImageMagickGIFEncoder*);
35void ImageMagickGIFEncoderSetParams(struct ImageMagickGIFEncoder* encoder, int frameskip, int delayMs);
36bool ImageMagickGIFEncoderOpen(struct ImageMagickGIFEncoder*, const char* outfile);
37bool ImageMagickGIFEncoderClose(struct ImageMagickGIFEncoder*);
38bool ImageMagickGIFEncoderIsOpen(struct ImageMagickGIFEncoder*);
39
40CXX_GUARD_END
41
42#endif