[Mapserver-users] Re: first-pass MapServer raster query workflow

Frank Warmerdam warmerdam at pobox.com
Thu Jan 15 12:42:19 PST 2004


Charlton Purvis wrote:
> Hey, Frank:
> 
> Don't know if I should bore the MapServer or GDAL lists w/ this or not.
> I'll fire it to MapServer people in case they're interested.
> 
> Goal is to create a quick raster query hack.
> 
> Quick question.  I know that we can't currently rely on MapServer to
> preserve the color index of a PNG.  But can we count on it to preserve
> the RGB?  If so, the hack that I'm forwarding below should work.
> 
> Attached image contains in-situ SST's (sea surface temps.) on top of
> AVHRR SST's.

Charlton,

If your input is a 24 bit PNG file, and your output is a 24bit PNG file,
you can be assured that the output PNG file will contain exactly the same
RGB tuples as the input file.  If either is 8bit things are substantially
less certain.  There are also other things that can interfere, such as layer
level transparency, but I am assuming that is not coming into play.

If the input is 8bit pseudocolored PNG and the output is 24bit PNG then I
think you would be OK, but a test might be in order. :-)  A quick review
of the code in question though suggested even the 8bit to 24bit case
should be safe.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the MapServer-users mailing list