Blob Blame History Raw
--- g2clib-1.6.3/dec_jpeg2000.c.jasper3_internal	2021-03-09 05:09:53.000000000 +0900
+++ g2clib-1.6.3/dec_jpeg2000.c	2022-02-14 17:13:00.280165566 +0900
@@ -56,7 +56,6 @@
     jas_image_t *image=0;
     jas_stream_t *jpcstream;
     jas_image_cmpt_t *pcmpt;
-    char *opts=0;
     jas_matrix_t *data;
 
 //    jas_init();
@@ -70,8 +69,8 @@
 
 //   
 //     Decode JPEG200 codestream into jas_image_t structure.
-//       
-    image=jpc_decode(jpcstream,opts);
+//
+    image=jas_image_decode (jpcstream, -1, 0);
     if ( image == 0 ) {
        printf(" jpc_decode return\n");
        return -3;
--- g2clib-1.6.3/enc_jpeg2000.c.jasper3_internal	2022-02-14 17:13:00.278165564 +0900
+++ g2clib-1.6.3/enc_jpeg2000.c	2022-02-14 17:27:57.490383488 +0900
@@ -72,6 +72,7 @@
                  g2int jpclen)
 {
     int ier,rwcnt;
+    int fmt;
     jas_image_t image;
     jas_stream_t *jpcstream,*istream;
     jas_image_cmpt_t cmpt,*pcmpt;
@@ -162,7 +163,8 @@
 //
 //     Encode image.
 //
-    ier=jpc_encode(&image,jpcstream,opts);
+    fmt = jas_image_strtofmt("jpc");
+    ier=jas_image_encode(&image,jpcstream,fmt,opts);
     if ( ier != 0 ) {
        printf(" jpc_encode return = %d \n",ier);
        return -3;