summaryrefslogtreecommitdiff
path: root/libopenjpeg/openjpeg.h
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2007-01-30 10:51:29 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2007-01-30 10:51:29 +0000
commita6d737721317691cdec1bb078eca8c93a7313379 (patch)
tree79a968921fbb47ddd66e7f4566b91aade24f6569 /libopenjpeg/openjpeg.h
parentd48feb45fc7427e578b95c8844814e23d1999dac (diff)
Use of OPJ_PATH_LEN (defined as 4096) to be the maximum allowed size for filenames instead of MAX_PATH which is not always defined. This caused some programs using OpenJPEG to crash. Modifications in openjpeg.h j2k_to_image.c and image_to_j2k.c
Diffstat (limited to 'libopenjpeg/openjpeg.h')
-rw-r--r--libopenjpeg/openjpeg.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/libopenjpeg/openjpeg.h b/libopenjpeg/openjpeg.h
index 92caa561..39290106 100644
--- a/libopenjpeg/openjpeg.h
+++ b/libopenjpeg/openjpeg.h
@@ -90,9 +90,7 @@ braindamage below.
==========================================================
*/
-#ifndef MAX_PATH
-#define MAX_PATH 260 /**< Maximum allowed size for filenames */
-#endif /* MAX_PATH */
+#define OPJ_PATH_LEN 4096 /**< Maximum allowed size for filenames */
#define J2K_MAXRLVLS 33 /**< Number of maximum resolution level authorized */
#define J2K_MAXBANDS (3*J2K_MAXRLVLS-2) /**< Number of maximum sub-band linked to number of resolution level */
@@ -256,13 +254,13 @@ typedef struct opj_cparameters {
/**@name command line encoder parameters (not used inside the library) */
/*@{*/
/** input file name */
- char infile[MAX_PATH];
+ char infile[OPJ_PATH_LEN];
/** output file name */
- char outfile[MAX_PATH];
+ char outfile[OPJ_PATH_LEN];
/** creation of an index file, default to 0 (false) */
int index_on;
/** index file name */
- char index[MAX_PATH];
+ 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 */
@@ -336,9 +334,9 @@ typedef struct opj_dparameters {
/**@name command line encoder parameters (not used inside the library) */
/*@{*/
/** input file name */
- char infile[MAX_PATH];
+ char infile[OPJ_PATH_LEN];
/** output file name */
- char outfile[MAX_PATH];
+ char outfile[OPJ_PATH_LEN];
/** input file format 0: J2K, 1: JP2, 2: JPT */
int decod_format;
/** output file format 0: PGX, 1: PxM, 2: BMP */