<DIV>HI:</DIV>
<DIV> </DIV>
<DIV> I tried to read a .tif file with data type of "GDT_Byte" using the method of "RasterIO". It did well without problem. But When I tied to read a .tif file with data type of "GDT_Int32", it did't work. My code is here:</DIV>
<DIV> </DIV>
<DIV>if (RasterBand->GetRasterDataType() == GDT_Int32){</DIV>
<DIV> LONG* pData;<BR> pData = (LONG*) CPLMalloc(sizeof(LONG)*nXSize*nYSize);<BR> RasterBand->RasterIO( GF_Read, 0, 0, nXSize, nYSize, pData, nXSize, nYSize, GDT_Int32, 0, 0 ); </DIV>
<DIV> }</DIV>
<DIV> </DIV>
<DIV>The pData is NULL. And the image data can't be read from the file. Would anyone tell what is the wrong? Thanks !</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV > </DIV><br><!-- footer --><br><br><br><br><br><div style="border-bottom:1px solid #999"></div><br>
        <font color="black" style="font-size:14.8px">美 女 恐 怖 败 家 秀 ( 组 图 ) </font>
        <br>
         <a href="http://adtaobao.allyes.com/main/adfclick?db=adtaobao&bid=600,597,58&cid=29985,198,1&sid=32501&show=ignore&url=http://www.taobao.com/vertical/lady/pro.php" target="_blank" style="font-size:13px;line-height:160%;color:blue">独 家 披 露 ! 小 资 女 人 8 个 绝 顶 隐 秘 的 趣 事 ( 组 图 )
</a>