Applying transparency in an image service definition
手順:
-
Create a new service and add your raster data.
If you use the New Image Service Wizard, uncheck the Generate overviews and Compile the service for publishing options.
- Define the NoData value. This is the value you want to define as transparent. You can edit each of the raster properties by using the toolbar, using the Edit Raster Properties Wizard, or editing the .RPDef files.
-
Edit the raster properties using the toolbar.
- Select a footprint.
- Click the Raster Properties button on the Image Service Definition Editor toolbar.
- Click the General node.
-
Type the value that you want treated as transparent in the No data value text box.
For example, in a three-band image, 0,0,0 may represent the RGB transparent value; however, you only need to enter 0.
- Click OK and edit another raster if necessary.
- Click the Image Service Properties button on the Image Service Definition Editor toolbar.
- Click the Service Definition node.
-
Click the Transparency arrow and click On.
- Click the Default Client Properties node.
- Click the Sampling Method arrow and click Nearest Neighbor.
- Click OK.
- Click the Image Service drop-down menu and click Advanced → Service Overviews → Define.
- Click the Sampling method arrow and click Nearest Neighbor.
- Click OK.
- Click OK when the service overviews have been defined.
- Click the Image Service drop-down menu and click Advanced → Build.
- Click OK.
- Preview the image service.
The Service Overviews Parameters dialog box opens.
Generate derived images should be checked.
Compile service should be checked.
7/10/2012