From 110b54c7c6f1ceea769264e78424883ff4a4701d Mon Sep 17 00:00:00 2001 From: Parvatha Elangovan Date: Thu, 12 Apr 2007 10:01:48 +0000 Subject: [PATCH] Fixed Error in tiftoimage(). Modification in convert.c. --- ChangeLog | 3 +++ codec/convert.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ded1a3c..1dbbbfa2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ What's New for OpenJPEG ! : changed + : added +April 12,2007 +* [Parvatha] Fixed Error in tiftoimage(). Modification in convert.c. + April 10,2007 + [Parvatha] Accepting "j2c" as format for Encoding and Decoding. Modification in image_to_j2k.c. * [Parvatha] Modified imagetotif() to read images with signed data. Modification in convert.c. diff --git a/codec/convert.c b/codec/convert.c index 4ffa1ef0..28bad27d 100644 --- a/codec/convert.c +++ b/codec/convert.c @@ -1355,7 +1355,7 @@ opj_image_t* tiftoimage(char *filename, opj_cparameters_t *parameters) if (Info.tiBps==12){ for (i=0; icomps[0].data[index] = ( dat8[i+0]<<4 ) |(dat8[i+1]>>4); image->comps[1].data[index] = ((dat8[i+1]& 0x0f)<< 8) | dat8[i+2]; image->comps[2].data[index] = ( dat8[i+3]<<4) |(dat8[i+4]>>4); @@ -1369,7 +1369,7 @@ opj_image_t* tiftoimage(char *filename, opj_cparameters_t *parameters) } else if( Info.tiBps==16){ for (i=0; icomps[0].data[index] = ( dat8[i+1] << 8 ) | dat8[i+0]; // R image->comps[1].data[index] = ( dat8[i+3] << 8 ) | dat8[i+2]; // G image->comps[2].data[index] = ( dat8[i+5] << 8 ) | dat8[i+4]; // B @@ -1380,7 +1380,7 @@ opj_image_t* tiftoimage(char *filename, opj_cparameters_t *parameters) } else if ( Info.tiBps==8){ for (i=0; icomps[0].data[index] = dat8[i+0]; // R image->comps[1].data[index] = dat8[i+1]; // G image->comps[2].data[index] = dat8[i+2]; // B