1/* Copyright (C) 2001-2019 Artifex Software, Inc.
2 All Rights Reserved.
3
4 This software is provided AS-IS with no warranty, either express or
5 implied.
6
7 This software is distributed under license and may not be copied,
8 modified or distributed except as expressly authorized under the terms
9 of the license contained in the file LICENSE in this distribution.
10
11 Refer to licensing information at http://www.artifex.com or contact
12 Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
13 CA 94945, U.S.A., +1(415)492-9861, for further information.
14*/
15
16/*
17 jbig2dec
18*/
19
20#ifndef _JBIG2_IMAGE_H
21#define _JBIG2_IMAGE_H
22
23typedef enum {
24 JBIG2_COMPOSE_OR = 0,
25 JBIG2_COMPOSE_AND = 1,
26 JBIG2_COMPOSE_XOR = 2,
27 JBIG2_COMPOSE_XNOR = 3,
28 JBIG2_COMPOSE_REPLACE = 4
29} Jbig2ComposeOp;
30
31Jbig2Image *jbig2_image_new(Jbig2Ctx *ctx, uint32_t width, uint32_t height);
32void jbig2_image_release(Jbig2Ctx *ctx, Jbig2Image *image);
33Jbig2Image *jbig2_image_reference(Jbig2Ctx *ctx, Jbig2Image *image);
34void jbig2_image_free(Jbig2Ctx *ctx, Jbig2Image *image);
35void jbig2_image_clear(Jbig2Ctx *ctx, Jbig2Image *image, int value);
36Jbig2Image *jbig2_image_resize(Jbig2Ctx *ctx, Jbig2Image *image, uint32_t width, uint32_t height, int value);
37int jbig2_image_compose(Jbig2Ctx *ctx, Jbig2Image *dst, Jbig2Image *src, int x, int y, Jbig2ComposeOp op);
38
39int jbig2_image_get_pixel(Jbig2Image *image, int x, int y);
40void jbig2_image_set_pixel(Jbig2Image *image, int x, int y, bool value);
41
42#endif /* _JBIG2_IMAGE_H */
43