<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="RIGHT: auto">GDAL community,</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Is is plausible to contain a RGB image array (as pixel interleaved, rgbrgbrgbrgb) in a single MEMRasterBand to generate a color file via GDALCreateCopy()?</div>
<div style="RIGHT: auto">My application performs the following sequence:</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">1. Read a color image into an image buffer in pixel interleaved (rgbrgbrgb) format.</div>
<div style="RIGHT: auto">2. Setup MEM Driver to contain the recently read in image from step 1 above via AddBand().</div>
<div style="RIGHT: auto">3. Call GDALCreateCopy() on the specific output of my desire.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I have a question on Step 2 above (AddBand()).  Do I have to create 3 seperate bands to contain individual color component?  That would mean I have to take my RGB image buffer and seperate it into three new arrays of size (imageWidth * imageHeight) and call AddBands() on each one.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I am trying to adviod that step as I find it as an extra step.  However, I understand if I have to because for a given color image GDAL always represents the file with 3 or 4 bands.  </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">My answer is I will probably have to.  My application can write out a valid file, but the resulting file is in Greyscale.</div>
<div style="RIGHT: auto"><VAR id=yui-ie-cursor></VAR> </div>
<div style="RIGHT: auto">Robert</div>
<div style="RIGHT: auto"> </div></div></body></html>