WMS Raster Transparency

Hi all,

i'm pubblishing raster image (hmr format).

Image background color is white but i need to render them with the trasparency background. There is a GWP feature, suitable from WMS, that can help me?

In the example below i would like substitute white pixel with a "trasparecy color".

Thanks 

Fabio

  • Hi Fabio,

    The HMR file format doesn`t support pixel type with transparency (i.e. : alpha channel). If your raster is attached in a DGN file and your are publishing the DGN file, you can try setting white has the transparent color for your HMR file attached in the DGN.

    The setting of a transparent color can be done with the controls at the bottom of the Raster Manager dialog box.

    Thanks,

    Mathieu



  • Hi Fabio,

    It is possible to apply transparency on raster images for a specific color by creating a pss file (PictureScript Scene).

    Here is an example of pss file that can help you:

    ;References to images
    AerialImg1 = imagefile("Aerial1.iTIFF")
    AerialImg2 = imagefile("Aerial2.iTIFF")
    AerialImg3 = imagefile("Aerial3.iTIFF")

    ;Apply transparency (opacity 0) on the color #0
    opacity1 = alphapalette(0, 0)
    AerialImg1x = translucentimage(AerialImg1, opacity1)

    AerialImg2x = translucentimage(AerialImg2, opacity1)
    AerialImg3x = translucentimage(AerialImg3, opacity1)

    ;Combine the images into a single mosaic
    result = mosaic(AerialImg1x, AerialImg2x, AerialImg3x)

    ;Show the final result
    PAGE(result)

     

    Save this code in a .pss file in the same directory as your hmr images then add a graphical source that point to this file.

    HTH 

    Sylvain