Skip to content

Commit

Permalink
Merge branch 'develop' into ejh_finalize_test
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett authored Oct 2, 2023
2 parents 70af2ea + e30b0c9 commit bb707b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dec_jpeg2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int_dec_jpeg2000(char *injpc, g2int bufsize, void *outfld, int out_is_g2int)
if (( g2jaspermaxmem = getenv("G2_JASPER_MAXMEM")) != NULL )
jas_conf_set_max_mem_usage(atoi(g2jaspermaxmem));
else
jas_conf_set_max_mem_usage(1073741824);
jas_conf_set_max_mem_usage(G2C_JASPER_MAX_MEMORY);
jas_conf_set_multithread(true);
if (jas_init_library())
return G2_JASPER_INIT;
Expand Down
2 changes: 1 addition & 1 deletion src/enc_jpeg2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ enc_jpeg2000(unsigned char *cin, g2int width, g2int height, g2int nbits,
if (( g2jaspermaxmem = getenv("G2_JASPER_MAXMEM")) != NULL )
jas_conf_set_max_mem_usage(atoi(g2jaspermaxmem));
else
jas_conf_set_max_mem_usage(1073741824);
jas_conf_set_max_mem_usage(G2C_JASPER_MAX_MEMORY);
jas_conf_set_multithread(true);
if (jas_init_library())
return G2_JASPER_INIT;
Expand Down
5 changes: 5 additions & 0 deletions src/jpeg.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ typedef float g2float;

/** Name of JPEG codec in Jasper. */
#define G2C_JASPER_JPEG_FORMAT_NAME "jpc"

/** Max memory size setting for Jasper. This can be over-ridden at
* run-time by setting environment variable G2_JASPER_MAXMEM. */
#define G2C_JASPER_MAX_MEMORY 1073741824

0 comments on commit bb707b5

Please sign in to comment.