[mapguide-users] transparency and gdal again
Traian Stanev
traian.stanev at autodesk.com
Thu Feb 22 10:14:16 EST 2007
For bitonal rasters, MapGuide takes the foreground and background colors
as set by Studio directly without modification. So if the background
color is set to transparent, it should really look transparent in the
viewer.
However, if the provider is not returning a 1-bpp raster and instead is
using some other color format, then the colors set in Studio will not be
used since the code will assume that the raster is not bitonal.
You can check this by setting the colors to purple or yellow in Studio
and then see if they appear correct in the viewer. If they do, then the
next thing to try would be to set the color to transparent and see what
was actually saved in the layer definition XML file. If that shows the
alpha value as 0, then it would be a bug in the server code somewhere.
Traian
-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Frank
Warmerdam (External)
Sent: Thursday, February 22, 2007 9:58 AM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] transparency and gdal again
robert fritz wrote:
> Hello,
>
> I have looked up the mailing list archive but I did not find a
sufficient
> answer to these questions:
>
> 1) I have 2 colored black-white raster images (Geotiff, Group 4 Fax
> Encoding) and tried to set the background color to "transparent" or
> "backgroundcolor of the map window" in MapGuide Studio, but the images
are
> still shown not transparent. Do I something wrong or does the GDAL
driver
> not support transparency up to now? (GDAL works very fine in Mapserver
-
> transparency and performance).
Robert,
How do you do this? I don't see anything obvious about transparency in
the generic data connection dialog, or the layer dialog. Certainly I am
not aware of any way that such information would be translated back to
the
actual raster provider.
> 2) There is no functionality (in Studio) to set transparency for a
color in
> multi-color images (as in Mapserver)? Do I have to create transparency
using
> PhotoShop or something else?
The fdo gdal based raster provider can communicate a nodata value up to
MapGuide, though I don't know if this is utilized for anything. Also
the
data provider can return alpha transparency if requested. So you could
preprocess your data into an RGBA image on disk and set the alpha
appropriately
to get transparency through to MapGuide.
Hopefully the mapguide folks will have a comment on how this is supposed
to
work.
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 | President OSGeo,
http://osgeo.org
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list