[gdal-dev] RE: Problem w\images with one raster band

2012-01-13 Thread AksakTimur
Martin, This code below seems to work well: ... checking if the band is a paletted one ... else if (bandPalette) { // Paletted map int pixelSpace=1*numBytesPerPixel; int lineSpace=destWidth * pixelSpace; unsigned char *rawImageData; rawImageData = new unsigned char[destWidt

Re: [gdal-dev] Re: Problem w\images with one raster band

2012-01-11 Thread Ari Jolma
oops, I seem to have asked off-list from Timur an example file. Timur, the file you sent me has a color table, which you need to use for RGB lookup - the value in the raster is an index to the color LUT. Best regards, Ari On 01/11/2012 12:08 PM, AksakTimur wrote: http://osgeo-org.1803224.n2

[gdal-dev] Re: Problem w\images with one raster band

2012-01-11 Thread AksakTimur
http://osgeo-org.1803224.n2.nabble.com/file/n7175677/Image.cpp Image.cpp Ari, void CViewMain::OnDraw() { if (m_image.IsOpen()) { m_image.Draw(hdcMem,m_image.m_XOff,m_image.m_YOff,m_image.m_imgWidth,m_image.m_imgHeight, m_image.m_xSrc,m_ima