summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConstantin <jucovschi@gmail.com>2010-04-09 12:03:47 +0200
committerConstantin <jucovschi@gmail.com>2010-04-09 12:04:41 +0200
commitae19f9b07d8d24b865bd0f1d886fc920cc9f37b1 (patch)
tree887dba39ec5b5208caee85a4eddfcd5f2e5ff90b
parent1c448e00c4596b86f4edd557d96d442c03d3c800 (diff)
downloadrasdaman-upstream-ae19f9b07d8d24b865bd0f1d886fc920cc9f37b1.zip
rasdaman-upstream-ae19f9b07d8d24b865bd0f1d886fc920cc9f37b1.tar.gz
rasdaman-upstream-ae19f9b07d8d24b865bd0f1d886fc920cc9f37b1.tar.xz
fixed tiff(a) bug
-rw-r--r--conversion/tiff.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/conversion/tiff.cc b/conversion/tiff.cc
index e451884..46b235e 100644
--- a/conversion/tiff.cc
+++ b/conversion/tiff.cc
@@ -175,7 +175,7 @@ void r_Conv_TIFF::initTIFF( void )
/// constructor using type structure
r_Conv_TIFF::r_Conv_TIFF(const char *src, const r_Minterval &interv, const r_Type *tp) throw(r_Error)
-: r_Convert_Memory(src, interv, tp)
+ : r_Convert_Memory(src, interv, tp, true)
{
ENTER( "r_Conv_TIFF::r_Conv_TIFF( " << (src?src:"(null)") << ", (minterval), (type ptr) )" );
@@ -259,6 +259,7 @@ r_convDesc &r_Conv_TIFF::convertTo( const char *options ) throw(r_Error)
break;
case ctype_float32:
bps = 32; bpp = 32; pixelAdd = 4*height; lineAdd = 4;
+ break;
default:
TALK( "r_Conv_TIFF::convertTo(): error: unsupported base type " << desc.baseType << "." );
RMInit::logOut << "Error: encountered unsupported TIFF base type." << endl;
@@ -406,7 +407,7 @@ r_convDesc &r_Conv_TIFF::convertTo( const char *options ) throw(r_Error)
for (i =0; i<width; i++)
{
*((uint16*)normal) = *((uint16*)l);
- l +=2;
+ l +=pixelAdd;
normal += 2;
}
}
@@ -417,7 +418,7 @@ r_convDesc &r_Conv_TIFF::convertTo( const char *options ) throw(r_Error)
for(i=0; i<width; i++)
{
*((float*)normal) = *((float*)l);
- l += 4; normal += 4;
+ l += pixelAdd; normal += 4;
}
}
break;