Hi, I finally managed to get the GetColorInterpretation() to return the correct values with gdal1.8.0dev<div>but RasterIO() still gives me CE_Failure. <img src="cid:35F@goomoji.gmail" style="margin-top: 0px; margin-right: 0.2ex; margin-bottom: 0px; margin-left: 0.2ex; vertical-align: middle; " goomoji="35F"></div>
<div><br></div><div>here&#39;s a snippet of the code:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>poBand = poDataset-&gt;GetRasterBand( bandNum );</div><div><br></div><div>
<span class="Apple-tab-span" style="white-space:pre">                        </span>int nXSize = poBand-&gt;GetXSize();</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>int<span class="Apple-tab-span" style="white-space:pre">        </span>nYSize = poBand-&gt;GetYSize();</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>GDALColorInterp colorInterp = poBand-&gt;GetColorInterpretation();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>GDALColorTable *poColorTable = NULL;</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if (colorInterp == GCI_PaletteIndex)</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>poColorTable = poBand-&gt;GetColorTable();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>Scanline = new BYTE [nXSize*nYSize];</div><div><span class="Apple-tab-span" style="white-space: pre; ">                        </span>&lt;&lt; NULL Scanline checking here &gt;&gt;</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>CPLErr result = poBand-&gt;RasterIO( GF_Read, 0, 0, nXSize, nYSize, </div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>Scanline, nXSize, nYSize, GDT_Byte, </div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>0, 0 );</div></div><div><br></div><div><div><br></div><div>Thanks in advance :)<br><br><div class="gmail_quote">On Tue, Dec 21, 2010 at 6:49 PM, Even Rouault <span dir="ltr">&lt;<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Selon Cher Quisido &lt;<a href="mailto:cherquisido@gmail.com">cherquisido@gmail.com</a>&gt;:<br>
<br>
This has been fixed in GDAL 1.8.0dev. See <a href="http://trac.osgeo.org/gdal/ticket/3420" target="_blank">http://trac.osgeo.org/gdal/ticket/3420</a><br>
<div><div></div><div class="h5"><br>
&gt; Hi,<br>
&gt;<br>
&gt; I am trying to add WMS support to our current GIS application. And I have<br>
&gt; some problems when reading the raster data.<br>
&gt;<br>
&gt; I get 3 bands on the call to GetRasterCount() but in the call to<br>
&gt; GetColorInterpretation() I get GCI_Undefined. I also get CE_Failure on my<br>
&gt; call to RasterIO().<br>
&gt;<br>
&gt; I am using the current implementation of our Raster Import which works well<br>
&gt; with the gdal_translate output image of my WMS the same xml input.<br>
&gt;<br>
&gt; I have GDAL 1.7.3 (WMS-enabled).<br>
&gt;<br>
&gt; Nothing on the web has helped up to now. :(<br>
&gt; Any help will be greatly appreciated.<br>
&gt;<br>
<br>
<br>
</div></div></blockquote></div><br></div></div>