[mapserver-users] Simple image compositing / alpha channel work?

Mel VanderWal vanderwalm at gaiaenv.com
Wed Jul 11 14:54:02 EDT 2001


Ed;

If I'm understanding your intent properly, what you'd like to do is
composite the hillshade into a second image to give the second image the
relief effect shown in the hillshade.  I'm not sure about using the OFFSITE
parameter or using an alpha channel.  The way I've done this before is to
get a brightness factor (greyscale value / 256) to get a floating point
value between 0-1.0.  Then multiply each color channel of a 24 bit image by
the brightness factor to get an integer between 0-255, and combine the new
R,G, & B channels into a 24 bit image.  Then you'd have to drop the 24 bit
image to 8 bit paletted for use in MapServer.  This was done in a GIS using
grid datasets; I don't know if there's any C code out there to do the same
thing.

Hope this helps you.

Regards,
Mel

Mel VanderWal
GIS Manager
GAIA Consultants Inc.
Suite 306, 822-11th Avenue SW
Calgary, Alberta
Canada
T2R 0E5
Phone: (403) 571-7216
Fax: (403) 571-7211
www.gaiaenv.com
vanderwalm at gaiaenv.com

>-----Original Message-----
>From: owner-mapserver-users at lists.gis.umn.edu
>[mailto:owner-mapserver-users at lists.gis.umn.edu]On Behalf Of Ed
>McNierney
>Sent: Wednesday, July 11, 2001 10:44 AM
>To: mapserver-users
>Subject: [mapserver-users] Simple image compositing / alpha channel
>work?
>
>
>Folks -
>
>Has anyone done any raster image compositing or alpha channel work for
>MapServer?  I've got a gray-scale shaded relief basemap image that I'd
>like to use, initially with just another raster layer merged on top of
>it, and I need some simple alpha support (or a reasonable substitute).
>I'm starting with the OFFSITE parameter's all-or-nothing approach, but
>before I dig in and start coding I figured I'd check to see if there's
>any other applicable work out there.  Thanks!
>
>	- Ed
>
>Ed McNierney
>Chief Mapmaker
>TopoZone.com
>ed at topozone.com
>(978) 251-4242




More information about the mapserver-users mailing list