transparent_color image attribute not working

classic Classic list List threaded Threaded
3 messages Options
schultni schultni
Reply | Threaded
Open this post in threaded view
|

transparent_color image attribute not working

I'm trying to display my own GeoTiffs, which are made up of 16 colors and white as the background.  

here is a portion of  my .earth file:

<image name="JF_60_2" driver="gdal"> 
                <min_level>8</min_level>
                <url>C:\PugetSound\Images\jf2_tiled2.tif</url>       
                <transparent_color> "255 255 255 0" </transparent_color>
                <cache_enabled>false</cache_enabled>                       
    </image>

The image is drapped correctly, however the white background is still present.  I tried both 255 and 0 for the alpha channel (I'm not sure there is an alpha channel in my GeoTiff, is that the problem?)

I also made sure that the white space is really 255 255 255 and not some offwhite.

Any tips?

Thanks,
Nick
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: transparent_color image attribute not working

Hi Nick,

I just tested the transparent_color element and it seems to work fine.
 Looks like you have your color in quotes, try removing them and
specifying it like:
<transparent_color>255 255 255 0</transparent_color>

Thanks,

Jason

On Fri, Feb 5, 2010 at 5:48 PM, schultni [via osgEarth]
<[hidden email]> wrote:

> I'm trying to display my own GeoTiffs, which are made up of 16 colors and
> white as the background.
>
> here is a portion of  my .earth file:
>
> <image name="JF_60_2" driver="gdal">
>                 <min_level>8</min_level>
>                 <url>C:\PugetSound\Images\jf2_tiled2.tif</url>
>                 <transparent_color> "255 255 255 0" </transparent_color>
>                 <cache_enabled>false</cache_enabled>
>     </image>
>
> The image is drapped correctly, however the white background is still
> present.  I tried both 255 and 0 for the alpha channel (I'm not sure there
> is an alpha channel in my GeoTiff, is that the problem?)
>
> I also made sure that the white space is really 255 255 255 and not some
> offwhite.
>
> Any tips?
>
> Thanks,
> Nick
>
>
> ________________________________
> View message @
> http://n2.nabble.com/transparent-color-image-attribute-not-working-tp4522810p4522810.html
> To start a new topic under osgEarth, email
> [hidden email]
> To unsubscribe from osgEarth, click here.
>
schultni schultni
Reply | Threaded
Open this post in threaded view
|

Re: transparent_color image attribute not working

That fixed it, oops I guess I misread the documentation :-/

Thanks