How can I open a more-or-less arbitrary image file and have GDAL present
it to me (the programmer) in a "normalized" form?  I had thought that
the virtual datasets would allow me to do this.  But I can't tell how
from the tutorial.  Here are examples of what I've like to do:

On input

  Have color-mapped file look like RGB
  Convert file with nodata values to RGBA
  Convert RGB files to an RGBA file
  Convert gray files to RGB or RGBA
  Convert color files to gray
  Convert 16-bit files to 8 bit (according to some formula)
  Convert 16-bit files to float32 (with offset + scale)

On output (less important)

  Convert an RGBA image with an unused A channel (all opaque) to RGB
    file
  Convert an Gray-alpha image to a Gray-nodata file (if there's an
    unused gray value)
  Convert RGB to color-mapped if the number colors is small enough.

Basically, I would like to be able to deal with only a few basic image
types within my program and have the mapping from the various external
data arrangements done "seamlessly" by the reader.

I had coded up much of this functionality with my on layer on top of
GDAL.  But this got really messy after a while.  I'm looking for a
better approach and would welcome any advice.

--
Charles Karney <[email protected]>
SRI International, Princeton, NJ 08543-5300
Tel: +1 609 734 2312
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to