mupdf
Loading...
Searching...
No Matches
bitmap.h
Go to the documentation of this file.
1// Copyright (C) 2004-2025 Artifex Software, Inc.
2//
3// This file is part of MuPDF.
4//
5// MuPDF is free software: you can redistribute it and/or modify it under the
6// terms of the GNU Affero General Public License as published by the Free
7// Software Foundation, either version 3 of the License, or (at your option)
8// any later version.
9//
10// MuPDF is distributed in the hope that it will be useful, but WITHOUT ANY
11// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12// FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
13// details.
14//
15// You should have received a copy of the GNU Affero General Public License
16// along with MuPDF. If not, see <https://www.gnu.org/licenses/agpl-3.0.en.html>
17//
18// Alternative licensing terms are available from the licensor.
19// For commercial licensing, see <https://www.artifex.com/> or contact
20// Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
21// CA 94129, USA, for further information.
22
23#ifndef MUPDF_FITZ_BITMAP_H
24#define MUPDF_FITZ_BITMAP_H
25
26#include "mupdf/fitz/system.h"
27#include "mupdf/fitz/context.h"
28#include "mupdf/fitz/pixmap.h"
29
39typedef struct
40{
41 int refs;
42 int w, h, stride, n;
43 int xres, yres;
44 unsigned char *samples;
45} fz_bitmap;
46
54
62
69
77typedef struct fz_halftone fz_halftone;
78
91
104
122
135fz_bitmap *fz_new_bitmap(fz_context *ctx, int w, int h, int n, int xres, int yres);
136
151void fz_bitmap_details(fz_bitmap *bitmap, int *w, int *h, int *n, int *stride);
152
159
171
179
187
188#endif
void fz_clear_bitmap(fz_context *ctx, fz_bitmap *bit)
fz_bitmap * fz_keep_bitmap(fz_context *ctx, fz_bitmap *bit)
fz_bitmap * fz_new_bitmap_from_pixmap(fz_context *ctx, fz_pixmap *pix, fz_halftone *ht)
void fz_drop_bitmap(fz_context *ctx, fz_bitmap *bit)
struct fz_halftone fz_halftone
Definition bitmap.h:77
fz_halftone * fz_default_halftone(fz_context *ctx, int num_comps)
void fz_invert_bitmap(fz_context *ctx, fz_bitmap *bmp)
fz_bitmap * fz_new_bitmap_from_image(fz_context *ctx, fz_image *img, fz_halftone *ht)
fz_bitmap * fz_new_bitmap(fz_context *ctx, int w, int h, int n, int xres, int yres)
void fz_drop_halftone(fz_context *ctx, fz_halftone *ht)
fz_bitmap * fz_new_bitmap_from_pixmap_band(fz_context *ctx, fz_pixmap *pix, fz_halftone *ht, int band_start)
fz_halftone * fz_keep_halftone(fz_context *ctx, fz_halftone *half)
void fz_bitmap_details(fz_bitmap *bitmap, int *w, int *h, int *n, int *stride)
Definition bitmap.h:40
int xres
Definition bitmap.h:43
int stride
Definition bitmap.h:42
int h
Definition bitmap.h:42
int refs
Definition bitmap.h:41
unsigned char * samples
Definition bitmap.h:44
int n
Definition bitmap.h:42
int yres
Definition bitmap.h:43
int w
Definition bitmap.h:42
Definition context.h:886
Definition image.h:351
Definition pixmap.h:432