all repos — mgba @ daaa2fa5236df5e8976e7e0ba7ac39e0d9233422

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 "gba/gba.h"
10
11#define MAGICKCORE_HDRI_ENABLE 0
12#define MAGICKCORE_QUANTUM_DEPTH 8
13
14#include <wand/MagickWand.h>
15
16struct ImageMagickGIFEncoder {
17	struct mAVStream d;
18	MagickWand* wand;
19	char* outfile;
20	uint32_t* frame;
21
22	unsigned currentFrame;
23	int frameskip;
24	int delayMs;
25
26	unsigned iwidth;
27	unsigned iheight;
28};
29
30void ImageMagickGIFEncoderInit(struct ImageMagickGIFEncoder*);
31void ImageMagickGIFEncoderSetParams(struct ImageMagickGIFEncoder* encoder, int frameskip, int delayMs);
32bool ImageMagickGIFEncoderOpen(struct ImageMagickGIFEncoder*, const char* outfile);
33bool ImageMagickGIFEncoderClose(struct ImageMagickGIFEncoder*);
34bool ImageMagickGIFEncoderIsOpen(struct ImageMagickGIFEncoder*);
35
36#endif