[Gdal-dev] rgb2pct.py and NO_DATA?

Ethan Alpert ealpert at digitalglobe.com
Mon Sep 27 15:59:26 EDT 2004




Frank Wrote:

> Is your situation that you have a particular value marked as NODATA on
your red, green and blue input bands and that this is being ignored?
> If so, it should be possible to adjust the code for building a PCT to
ignore such pixels, (but to add a transparent color if any are found), 
> and then to change the DitherRGB2PCT() code to keep track of that.  If
this is what you need, please submit a bug report.  If you are 
> interested in doing it yourself and submitting patches let me know.

> However, it is pretty uncommon for folks to have nodata properly
marked on multispectral input images, so I hadn't thought about this
before.


Yep this is what I'm doing and intend. I am warping and mosaicing
multiple strips of imagery together. My goal is to have an indexed color
image to display in mapserver (I have several reasons for needing
indexed color). Because of color histogram differnces between the strips
of imagery I must quantize the image as my last step. Rgb2pct.py does
great except for this one problem. 

I'll submit a but report and start looking into how I can do this.

Thanks for the info.

-ethan







More information about the Gdal-dev mailing list