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