updated XCode project file
[openjpeg.git] / libopenjpeg / openjpeg.h
index 20ff7cf728144d8fefd353e3e393b48c29df4a21..ffcaacaf6e57fd490b6de72f398a298797c7f458 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef OPENJPEG_H
 #define OPENJPEG_H
 
-#define OPENJPEG_VERSION "1.2.0"
+#define OPENJPEG_VERSION "1.3.0"
 
 /* 
 ==========================================================
@@ -303,6 +303,10 @@ typedef struct opj_cparameters {
        char infile[OPJ_PATH_LEN];
        /** output file name */
        char outfile[OPJ_PATH_LEN];
+       /** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */
+       int index_on;
+       /** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */
+       char index[OPJ_PATH_LEN];
        /** subimage encoding: origin image offset in x direction */
        int image_offset_x0;
        /** subimage encoding: origin image offset in y direction */
@@ -486,7 +490,7 @@ typedef struct opj_cio {
        /** pointer to the start of the buffer */
        unsigned char *buffer;
        /** buffer size in bytes */
-       unsigned int length;
+       int length;
 
        /** pointer to the start of the stream */
        unsigned char *start;
@@ -606,6 +610,8 @@ typedef struct opj_tp_info {
        int tp_end_header;
        /** end position of tile part */
        int tp_end_pos;
+       /** start packet of tile part */
+       int tp_start_pack;
        /** number of packets of tile part */
        int tp_numpacks;
 } opj_tp_info_t;
@@ -697,6 +703,8 @@ typedef struct opj_codestream_info {
        int marknum;
        /** list of markers */
        opj_marker_info_t *marker;
+       /** actual size of markers array */
+       int maxmarknum;
 /* <<UniPG */
        /** main header position */
        int main_head_start;
@@ -817,13 +825,21 @@ Decoding parameters are returned in j2k->cp.
 */
 OPJ_API void OPJ_CALLCONV opj_setup_decoder(opj_dinfo_t *dinfo, opj_dparameters_t *parameters);
 /**
-Decode an image from a JPEG-2000 codestream
+Decode an image from a JPEG-2000 codestream 
+@param dinfo decompressor handle
+@param cio Input buffer stream
+@return Returns a decoded image if successful, returns NULL otherwise
+*/
+OPJ_API opj_image_t* OPJ_CALLCONV opj_decode(opj_dinfo_t *dinfo, opj_cio_t *cio);
+
+/**
+Decode an image from a JPEG-2000 codestream and extract the codestream information
 @param dinfo decompressor handle
 @param cio Input buffer stream
 @param cstr_info Codestream information structure if needed afterwards, NULL otherwise
 @return Returns a decoded image if successful, returns NULL otherwise
 */
-OPJ_API opj_image_t* OPJ_CALLCONV opj_decode(opj_dinfo_t *dinfo, opj_cio_t *cio, opj_codestream_info_t *cstr_info);
+OPJ_API opj_image_t* OPJ_CALLCONV opj_decode_with_info(opj_dinfo_t *dinfo, opj_cio_t *cio, opj_codestream_info_t *cstr_info);
 /**
 Creates a J2K/JP2 compression structure
 @param format Coder to select
@@ -869,10 +885,19 @@ Encode an image into a JPEG-2000 codestream
 @param cinfo compressor handle
 @param cio Output buffer stream
 @param image Image to encode
+@param index Depreacted -> Set to NULL. To extract index, used opj_encode_wci()
+@return Returns true if successful, returns false otherwise
+*/
+OPJ_API bool OPJ_CALLCONV opj_encode(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, char *index);
+/**
+Encode an image into a JPEG-2000 codestream and extract the codestream information
+@param cinfo compressor handle
+@param cio Output buffer stream
+@param image Image to encode
 @param cstr_info Codestream information structure if needed afterwards, NULL otherwise
 @return Returns true if successful, returns false otherwise
 */
-OPJ_API bool OPJ_CALLCONV opj_encode(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info);
+OPJ_API bool OPJ_CALLCONV opj_encode_with_info(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info);
 /**
 Destroy Codestream information after compression or decompression
 @param cstr_info Codestream information structure