summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2004-07-07 07:37:44 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2004-07-07 07:37:44 +0000
commit77ca0769e397ba25cf2a8d98f14a6e38ef7baba7 (patch)
tree463a94748d842fb9c69a7069e1a22a749c2d5f65
parent06496c203ebfc20e4b6734eff3fc4af80df2047a (diff)
New variable in cp structure for JP2 format
-rw-r--r--libopenjpeg/j2k.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libopenjpeg/j2k.h b/libopenjpeg/j2k.h
index 18645bdb..637b12b0 100644
--- a/libopenjpeg/j2k.h
+++ b/libopenjpeg/j2k.h
@@ -80,6 +80,7 @@ typedef struct {
int x1, y1; /* Xsiz, Ysiz */
int numcomps; /* number of components */
int index_on; /* 0 = no index || 1 = index */
+ int color_space; /* sRGB, Greyscale or YUV */
j2k_comp_t *comps; /* image-components */
} j2k_image_t;
@@ -129,6 +130,8 @@ typedef struct {
} j2k_tcp_t;
typedef struct {
+ int JPEG2000_format; /* 0: J2K 1:JP2 */
+ int intermed_file; /* 1: Store each encoded tile one by one in the output file (for mega-Images)*/
int image_type; /* 0: PNM, PGM, PPM 1: PGX */
int disto_alloc; /* Allocation by rate/distortion */
int fixed_alloc; /* Allocation by fixed layer */
@@ -161,6 +164,7 @@ typedef struct {
int end_header; /* End position of the header */
int end_pos; /* End position */
int pw[33], ph[33]; /* precinct number for each resolution level */
+
int pdx[33], pdy[33]; /* precinct size (in power of 2), in X and Y for each resolution level */
info_packet *packet; /* information concerning packets inside tile */
int nbpix; /* add fixed_quality */
@@ -188,11 +192,11 @@ typedef struct {
* Encode an image into a JPEG-2000 codestream
* i: image to encode
* cp: coding parameters
- * dest: destination buffer
+ * output: destination buffer or name of the output file when cp->intermed_file==1
* len: length of destination buffer
* index : index file name
*/
-LIBJ2K_API int j2k_encode(j2k_image_t * i, j2k_cp_t * cp, char *outfile,
+LIBJ2K_API int j2k_encode(j2k_image_t * i, j2k_cp_t * cp, char *output,
int len, char *index);
/* LIBJ2K_API int j2k_encode(j2k_image_t *i, j2k_cp_t *cp,unsigned char *dest, int len); */