<DIV>&nbsp;</DIV>
<DIV>&nbsp;hello:</DIV>
<DIV>&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp; how can I configue which lib and&nbsp; .h files in vc2005 smart device application to&nbsp; open img?</DIV>
<DIV>&nbsp;&nbsp; and </DIV>
<DIV>&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; m_pMemoryDC-&gt;SelectObject(m_pMemoryBitMap);<BR>&nbsp; CRect rc(0,0,m_pViewWidth,m_pViewHeight); <BR>&nbsp; CBrush brush(RGB(255,255,255));<BR>&nbsp;&nbsp;&nbsp;&nbsp; m_pMemoryDC-&gt;FillRect(rc,&amp;brush); <BR>&nbsp; GDALAllRegister(); <BR>&nbsp; poDataset = (GDALDataset *) GDALOpen(m_strimagePath, GA_ReadOnly );<BR>&nbsp; if( poDataset != NULL )<BR>&nbsp; {<BR>&nbsp;<BR>&nbsp;&nbsp; GDALRasterBand *poBand1;&nbsp;&nbsp; //遥感的一个波段<BR>&nbsp;&nbsp; GDALRasterBand *poBand2;<BR>&nbsp;&nbsp; GDALRasterBand *poBand3;<BR>&nbsp;&nbsp; int nBandCount,i;<BR>&nbsp;&nbsp; nBandCount=poDataset-&gt;GetRasterCount();<BR>&nbsp;&nbsp; poBand1=poDataset-&gt;GetRasterBand(1);<BR>&nbsp;&nbsp; poBand2=poDataset-&gt;GetRasterBand(2);<BR>&nbsp;&nbsp; poBand3=poDataset-&gt;GetRasterBand(3);<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; if (poBand1!=NULL &amp;&amp; poBand2 != NULL &amp;&amp;poBand3!=NULL)&nbsp; <BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; //获取图像的尺寸<BR>&nbsp;&nbsp; //获取图像窗口尺寸<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; int nImgSizeX=poDataset-&gt;GetRasterXSize();<BR>&nbsp;&nbsp; int nImgSizeY=poDataset-&gt;GetRasterYSize();<BR>&nbsp;int nBufferSizeX,nBufferSizeY;<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; nBufferSizeX = nImgSizeX;<BR>&nbsp;&nbsp; nBufferSizeY= nImgSizeY;<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; byte *pafScanblock1 ;<BR>&nbsp;&nbsp; byte *pafScanblock2 ;<BR>&nbsp;&nbsp; byte *pafScanblock3 ;<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; pafScanblock1 =new byte[(nBufferSizeX)*(nBufferSizeY)];<BR>&nbsp;&nbsp; pafScanblock2 = new byte[(nBufferSizeX)*(nBufferSizeY)];<BR>&nbsp;&nbsp; pafScanblock3 =new byte[(nBufferSizeX)*(nBufferSizeY)];<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; byte *m_ByteBuff = new byte[(nBufferSizeX)*(nBufferSizeY)*3];<BR>&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; poBand1-&gt;RasterIO( GF_Read, 0, 0,nBufferSizeX,nBufferSizeY, <BR>&nbsp;&nbsp;&nbsp; pafScanblock1,nBufferSizeX,nBufferSizeY, GDT_Byte,0, 0 );<BR>&nbsp;poBand2-&gt;RasterIO( GF_Read, 0, 0,nBufferSizeX,nBufferSizeY, <BR>&nbsp;&nbsp;&nbsp; pafScanblock2,nBufferSizeX,nBufferSizeY, GDT_Byte,0, 0 );<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; poBand3-&gt;RasterIO( GF_Read, 0, 0,nBufferSizeX,nBufferSizeY, <BR>&nbsp;&nbsp;&nbsp; pafScanblock3,nBufferSizeX,nBufferSizeY, GDT_Byte,0, 0 );&nbsp; <BR>&nbsp;&nbsp; //在View逐点显示图像<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; for (int x = 0; x &lt; nBufferSizeX; x ++) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int&nbsp; y = 0; y &lt; nBufferSizeY; y ++) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_pMemoryDC-&gt;SetPixel(x,y,RGB(pafScanblock1[y*nBufferSizeX+x],pafScanblock2[y*nBufferSizeX+x],pafScanblock3[y*nBufferSizeX+x])); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp; <BR>&nbsp;&nbsp;&nbsp; GDALClose(poDataset);<BR>&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;can not get r g b ?</DIV>
<DIV><BR>&nbsp;</DIV>