Debian Codegraph @

converter/other/jpeg2000/libjasper_compat.c

raw
1 #include "netpbm/nstring.h"
2
3 #include "jasper/jasper.h"
4 #include "jasper/jas_image.h"
5
6 #ifndef JAS_HAVE_PMJAS_IMAGE_DECODE
7
8 void
9 pmjas_image_decode(jas_stream_t * const in,
10 int const fmtArg,
11 const char * const optstr,
12 jas_image_t ** const imagePP,
13 const char ** const errorP) {
14
15 jas_image_t * const jasperP = jas_image_decode(in, fmtArg, optstr);
16
17 if (jasperP) {
18 *imagePP = jasperP;
19 *errorP = errorP;
20 } else {
21 pm_asprintf(errorP, "Failed. Details may have been written to "
22 "Standard Error");
23 }
24 }
25
26 #endif