mupdf
Toggle main menu visibility
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
39
typedef
struct
40
{
41
int
refs
;
42
int
w
,
h
,
stride
,
n
;
43
int
xres
,
yres
;
44
unsigned
char
*
samples
;
45
}
fz_bitmap
;
46
53
fz_bitmap
*
fz_keep_bitmap
(
fz_context
*ctx,
fz_bitmap
*bit);
54
61
void
fz_drop_bitmap
(
fz_context
*ctx,
fz_bitmap
*bit);
62
68
void
fz_invert_bitmap
(
fz_context
*ctx,
fz_bitmap
*bmp);
69
77
typedef
struct
fz_halftone
fz_halftone
;
78
90
fz_bitmap
*
fz_new_bitmap_from_pixmap
(
fz_context
*ctx,
fz_pixmap
*pix,
fz_halftone
*ht);
91
103
fz_bitmap
*
fz_new_bitmap_from_image
(
fz_context
*ctx,
fz_image
*img,
fz_halftone
*ht);
104
121
fz_bitmap
*
fz_new_bitmap_from_pixmap_band
(
fz_context
*ctx,
fz_pixmap
*pix,
fz_halftone
*ht,
int
band_start);
122
135
fz_bitmap
*
fz_new_bitmap
(
fz_context
*ctx,
int
w,
int
h,
int
n,
int
xres,
int
yres);
136
151
void
fz_bitmap_details
(
fz_bitmap
*bitmap,
int
*w,
int
*h,
int
*n,
int
*stride);
152
158
void
fz_clear_bitmap
(
fz_context
*ctx,
fz_bitmap
*bit);
159
170
fz_halftone
*
fz_default_halftone
(
fz_context
*ctx,
int
num_comps);
171
178
fz_halftone
*
fz_keep_halftone
(
fz_context
*ctx,
fz_halftone
*half);
179
186
void
fz_drop_halftone
(
fz_context
*ctx,
fz_halftone
*ht);
187
188
#endif
fz_clear_bitmap
void fz_clear_bitmap(fz_context *ctx, fz_bitmap *bit)
fz_keep_bitmap
fz_bitmap * fz_keep_bitmap(fz_context *ctx, fz_bitmap *bit)
fz_new_bitmap_from_pixmap
fz_bitmap * fz_new_bitmap_from_pixmap(fz_context *ctx, fz_pixmap *pix, fz_halftone *ht)
fz_drop_bitmap
void fz_drop_bitmap(fz_context *ctx, fz_bitmap *bit)
fz_halftone
struct fz_halftone fz_halftone
Definition
bitmap.h:77
fz_default_halftone
fz_halftone * fz_default_halftone(fz_context *ctx, int num_comps)
fz_invert_bitmap
void fz_invert_bitmap(fz_context *ctx, fz_bitmap *bmp)
fz_new_bitmap_from_image
fz_bitmap * fz_new_bitmap_from_image(fz_context *ctx, fz_image *img, fz_halftone *ht)
fz_new_bitmap
fz_bitmap * fz_new_bitmap(fz_context *ctx, int w, int h, int n, int xres, int yres)
fz_drop_halftone
void fz_drop_halftone(fz_context *ctx, fz_halftone *ht)
fz_new_bitmap_from_pixmap_band
fz_bitmap * fz_new_bitmap_from_pixmap_band(fz_context *ctx, fz_pixmap *pix, fz_halftone *ht, int band_start)
fz_keep_halftone
fz_halftone * fz_keep_halftone(fz_context *ctx, fz_halftone *half)
fz_bitmap_details
void fz_bitmap_details(fz_bitmap *bitmap, int *w, int *h, int *n, int *stride)
context.h
pixmap.h
fz_bitmap
Definition
bitmap.h:40
fz_bitmap::xres
int xres
Definition
bitmap.h:43
fz_bitmap::stride
int stride
Definition
bitmap.h:42
fz_bitmap::h
int h
Definition
bitmap.h:42
fz_bitmap::refs
int refs
Definition
bitmap.h:41
fz_bitmap::samples
unsigned char * samples
Definition
bitmap.h:44
fz_bitmap::n
int n
Definition
bitmap.h:42
fz_bitmap::yres
int yres
Definition
bitmap.h:43
fz_bitmap::w
int w
Definition
bitmap.h:42
fz_context
Definition
context.h:886
fz_image
Definition
image.h:351
fz_pixmap
Definition
pixmap.h:432
system.h
include
mupdf
fitz
bitmap.h
Generated by
1.17.0