GDAL Community,

I noticed GDAL has a utility program gdaladdo which embeds new overviews to a 
supplied file.  Does gdal have a utility program that allows me to extract 
overviews to a file?

If not, how would I be able to programmatically extract a specified overview 
within a JP2 image (using C/C++)?
What is the easiest way to get a reduced overview?

>From your website I think there is two options:

1. Use GDALRasterIO() and set nBufXSize and nBufYSize to be smaller than the 
window size forcing GDAL to try and use a suitable overview as explained from:
  http://www.gdal.org/gdal_tutorial.html

OR:

1. Check if GDALGetOverviewCount() > 0.  If true, then we have embedded 
overviews
2. Call GDALGetOverview(Band,1)  //For 1st overview band.  This will store the 
overview raster band in Band.  What happens if the image is RGB?  How do I 
obtain the R,G,B raster band of the overview at index 1?

3. Call GDALRasterBandXSize and GDALRasterBandYSize
4.  Once have all RasterBands and their sizes known, call GDALRasterIO to 
acquire the image.


How would you guys go about it?  I think I am on the right track.

Bob

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to