<DIV>HI:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; I tried to read a .tif file&nbsp;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&nbsp;with data type of "GDT_Int32", it did't work.&nbsp;&nbsp;My code is here:</DIV>
<DIV>&nbsp;</DIV>
<DIV>if (RasterBand-&gt;GetRasterDataType() == GDT_Int32){</DIV>
<DIV>&nbsp; LONG* pData;<BR>&nbsp;&nbsp;pData = (LONG*) CPLMalloc(sizeof(LONG)*nXSize*nYSize);<BR>&nbsp;&nbsp;RasterBand-&gt;RasterIO( GF_Read, 0, 0, nXSize, nYSize, pData, nXSize, nYSize,&nbsp;&nbsp; GDT_Int32, 0, 0 );&nbsp;&nbsp; </DIV>
<DIV>&nbsp; }</DIV>
<DIV>&nbsp;</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>&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV >&nbsp;</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>