You are here: Advanced Encoding and Tools > Working with Metadata > Setting Transparency Metadata

Setting Transparency Metadata

When you set values for transparency metadata, you specify the value for each band that contains no data. GeoExpress can use the transparency metadata that you specify to create an alpha band for your image. For more information on alpha bands, see Alpha Bands and MrSID. You can set transparency metadata for images with the MrSID Generation 3 and MrSID Generation 2 output formats. Because images in the MrSID Generation 4 (MG4) format already contain alpha bands, you cannot set transparency metadata for images in the MG4 format.

To set values for transparency metadata, use the -tpc switch. Set transparency values in the following format:

-tpc <band_number>@<color_value>

To specify multiple bands with the same color value, use a comma separated list of bands. For example, to specify that bands one, two, and three use a color value of zero, you might enter the following string :

-tpc 1,2,3@0

To specify multiple bands with multiple color values, use a comma separated list of band-color pairs. For example, to specify different color values for bands one, two, and three, you might enter the following string:

-tpc 1@0,2@1,3@2

To specify a range of bands that use the same color value, use a colon. For example, to specify that bands one through three use a color value of zero, you might enter the following format:

-tpc 1:3@0

To specify that one band uses one color value and that all other bands use another color value, use the REMAINDER parameter. For example, to specify that band one uses a color value of 127 and that all other bands use a color value of zero, you might enter the following string:

-tpc 1@127,REMAINDER@0

Alternatively, for 8-bit and 16-bit images you can also specify a transparency value using RGB values. To enter hexadecimal values, use the following format:

-tpc RRR_GGG_BBB

For example, to specify black as the transparency color with RGB values, enter the following string:

-tpc 000_000_000

NOTE: To change the metadata of existing MrSID images, use the mrsidgeometa -tpc command. If an image contains transparency metadata that is not valid, you can remove the transparency metadata with the mrsidgeometa -rtpc command. For more information on the mrsidgeometa application, see mrsidgeometa.