[gdal-dev] Reading RGB jpeg2000 image using Kakadu...proper order

Zermeno, Robert J CIV NAVAIR, 472100D robert.zermeno at navy.mil
Mon May 10 13:50:10 EDT 2010


Frank,

Is there a specific order needed to read in the image pixels?  Meaning, you typically need to use the combination functions of:
1. 
Redband  = GDALRasterBand(dataset,1)
Blueband = GDALRasterBand(dataset,2)
Greenband= GDALRasterBand(dataset,3)
2. 
GDALRasterIO(redBand)
GDALRasterIO(Blueand)
GDALRasterIO(GreenBand)

3. Depending on if Band 1 is Red, then store image data as:
Image[0] = BlueBand
Image[1] = GreenBand
Image[2] = RedBand

This is a very general sense.  I have noticed if I switch the order of GDALRasterband, I am provided with an image that is not displayed correctly (certain colors of off).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4926 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100510/45992f0c/smime.bin


More information about the gdal-dev mailing list