Lines 1-13
Link Here
|
1 |
#include "mupdf/fitz.h" |
1 |
#include "mupdf/fitz.h" |
2 |
|
2 |
|
3 |
/* Without the definition of OPJ_STATIC, compilation fails on windows |
|
|
4 |
* due to the use of __stdcall. We believe it is required on some |
5 |
* linux toolchains too. */ |
6 |
#define OPJ_STATIC |
7 |
#ifndef _MSC_VER |
8 |
#define OPJ_HAVE_STDINT_H |
9 |
#endif |
10 |
|
11 |
#include <openjpeg.h> |
3 |
#include <openjpeg.h> |
12 |
|
4 |
|
13 |
static void fz_opj_error_callback(const char *msg, void *client_data) |
5 |
static void fz_opj_error_callback(const char *msg, void *client_data) |
Lines 117-123
fz_load_jpx(fz_context *ctx, unsigned char *data, int size, fz_colorspace *defcs
Link Here
|
117 |
opj_stream_set_read_function(stream, fz_opj_stream_read); |
109 |
opj_stream_set_read_function(stream, fz_opj_stream_read); |
118 |
opj_stream_set_skip_function(stream, fz_opj_stream_skip); |
110 |
opj_stream_set_skip_function(stream, fz_opj_stream_skip); |
119 |
opj_stream_set_seek_function(stream, fz_opj_stream_seek); |
111 |
opj_stream_set_seek_function(stream, fz_opj_stream_seek); |
120 |
opj_stream_set_user_data(stream, &sb); |
112 |
opj_stream_set_user_data(stream, &sb, NULL); |
121 |
/* Set the length to avoid an assert */ |
113 |
/* Set the length to avoid an assert */ |
122 |
opj_stream_set_user_data_length(stream, size); |
114 |
opj_stream_set_user_data_length(stream, size); |