Changeset 14710
- Timestamp:
- 06/14/08 19:47:17 (6 months ago)
- Files:
-
- branches/1.5/gdal/frmts/hfa/hfaband.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.5/gdal/frmts/hfa/hfaband.cpp
r13359 r14710 568 568 ((GUInt32 *) pabyDest)[nPixelsOutput] = nDataValue; 569 569 } 570 /* -------------------------------------------------------------------- */571 /* Note, floating point values are handled somewhat */572 /* differently, and I've only been able to test f32 with a */573 /* 16bit offset value (see bug #1000 and */574 /* data/imagine/bug1000/float.img) */575 /* -------------------------------------------------------------------- */576 570 else if( nDataType == EPT_f32 ) 577 571 { 578 float fValue = *((float *) &nDataMin); 579 580 if( nNumBits == 16 ) 581 fValue = fValue + 0.25 * (nRawValue / 65536.0); 582 else 583 CPLAssert( FALSE ); 584 585 ((float *) pabyDest)[nPixelsOutput] = fValue; 572 /* -------------------------------------------------------------------- */ 573 /* Note, floating point values are handled as if they were signed */ 574 /* 32-bit integers (bug #1000). */ 575 /* -------------------------------------------------------------------- */ 576 ((float *) pabyDest)[nPixelsOutput] = *((float*)( &nDataValue )); 586 577 } 587 578 else
