all repos — mgba @ 2f1cb61d0197893cf0c3861e9130ff1aeaefb0b0

mGBA Game Boy Advance Emulator

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 "util/common.h"
10
11CXX_GUARD_START
12
13#include "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