From 4c361c0a7638b4f068e8b524e4ff43374a286018 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 26 Sep 2020 23:52:08 +0000 Subject: Promote Development to Advanced git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3972 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- .../jpeg2000/libjasper/include/jasper/jas_image.h | 27 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'converter/other/jpeg2000/libjasper/include/jasper/jas_image.h') diff --git a/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h b/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h index 6e914efd..20170986 100644 --- a/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h +++ b/converter/other/jpeg2000/libjasper/include/jasper/jas_image.h @@ -300,7 +300,10 @@ typedef struct { typedef struct { - jas_image_t *(*decode)(jas_stream_t *in, char *opts); + void (*decode)(jas_stream_t * const in, + const char * const opts, + jas_image_t ** const imagePP, + const char ** const errorP); /* Decode image data from a stream. */ int (*encode)(jas_image_t *image, jas_stream_t *out, char *opts); @@ -442,8 +445,14 @@ void jas_image_destroy(jas_image_t *image); any compression. */ uint_fast32_t jas_image_rawsize(jas_image_t *image); -/* Create an image from a stream in some specified format. */ -jas_image_t *jas_image_decode(jas_stream_t *in, int fmt, char *optstr); +#define JAS_HAVE_PMJAS_IMAGE_DECODE + +void +pmjas_image_decode(jas_stream_t * const in, + int const fmt, + const char * const optstr, + jas_image_t ** const imagePP, + const char ** const errorP); /* Write an image to a stream in a specified format. */ int jas_image_encode(jas_image_t *image, jas_stream_t *out, int fmt, @@ -567,14 +576,22 @@ int bmp_validate(jas_stream_t *in); #if !defined(EXCLUDE_JP2_CAPABILITY) /* Format-dependent operations for JP2 capability. */ -jas_image_t *jp2_decode(jas_stream_t *in, char *optstr); +void +jp2_decode(jas_stream_t * const in, + const char * const optstr, + jas_image_t ** const imagePP, + const char ** const errorP); int jp2_encode(jas_image_t *image, jas_stream_t *out, char *optstr); int jp2_validate(jas_stream_t *in); #endif #if !defined(EXCLUDE_JPC_CAPABILITY) /* Format-dependent operations for JPEG-2000 code stream capability. */ -jas_image_t *jpc_decode(jas_stream_t *in, char *optstr); +void +jpc_decode(jas_stream_t * const in, + const char * const optstr, + jas_image_t ** const imagePP, + const char ** const errorP); int jpc_encode(jas_image_t *image, jas_stream_t *out, char *optstr); int jpc_validate(jas_stream_t *in); #endif -- cgit 1.4.1