]> granicus.if.org Git - openjpeg/commitdiff
Multiple tile bug fixed (line 438)
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Fri, 16 Jul 2004 09:52:24 +0000 (09:52 +0000)
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Fri, 16 Jul 2004 09:52:24 +0000 (09:52 +0000)
libopenjpeg/jp2.c

index 6f13f4d72baa7662a9c85255fc7660d7081e1438..e1110ef0d9101ba3c67c9f7228d65c376df00947 100644 (file)
@@ -435,7 +435,7 @@ int jp2_write_jp2c(j2k_image_t * img, j2k_cp_t * cp, char *jp2_buffer,
   cio_skip(4);
   cio_write(JP2_JP2C, 4);      // JP2C
 
-  len = j2k_encode(img, cp, jp2_buffer, cp->tdx * cp->tdy * 2, index);
+  len = j2k_encode(img, cp, jp2_buffer, cp->tdx * cp->tdy * cp->th * cp->tw * 2, index);
 
   box.length = cio_tell() - box.init_pos;
   cio_seek(box.init_pos);
@@ -444,6 +444,7 @@ int jp2_write_jp2c(j2k_image_t * img, j2k_cp_t * cp, char *jp2_buffer,
   return box.length;
 }
 
+
 int jp2_read_jp2c(unsigned char *src, int len, jp2_struct_t * jp2_struct,
                  j2k_cp_t * cp)
 {