This sample illustrates how to apply a watermark to image service returned from the Export Map operation on a Image service.
You need to build soe with Visual Studio and then deploying the SOI from the .soe file (..\bin\Debug\net8.0\win-x64\DotNetImageServiceApplyWatermarkSOI_ent.soe
). In addition, you can load the project (..\NetApplyWatermarkSOI.csproj
) in Visual Studio to debug, modify, and recompile the SOI code.
Features
- Postprocess REST response
- OutputFormat
Sample data
Any Image service published from ArcGIS Pro or Admin rest end and geoprocessing tool. This instruction uses a Image Service as the sample service to test with the SOI.
Instructions
Deploy the SOI
- Log in to ArcGIS Server Manager and click the Site tab.
- Click Extensions.
- Click Add Extension.
- Click Choose File and choose the DotNetImageServiceApplyWatermarkSOI_ent.soe file (
..\bin\Debug\DotNetImageServiceApplyWatermarkSOI_ent.soe
). - Click Add.
Enable the SOI on a map service
- Make sure you have published the Image service using ArcGIS Pro or Admin rest end and geoprocessing tool.
- Log in to ArcGIS portal home application and select the Image Servive.Click the Settings tab. Select Extensions and expand it and find the SOI and expand it.
- In the SOI section, select DotNetImageServiceApplyWatermarkSOI_ent in the Available Interceptors box and enable it Enabled Interceptors.
- Click the Save and Restart button to restart the service.
Test the SOI
-
Open a browser and navigate to the REST services endpoint of the USA map service (URL:
http://<serverdomain>/<webadaptorname>/rest/services/Name/ImageServer
). -
Scroll to the bottom of the above page and click Export Map in Supported Extensions.
This leads you to the following URL:
http://<serverdomain>/<webadaptorname>/rest/services/Name/ImageServer/export?bbox=-178.85719640187426,13.522152002873426,-56.484036397641795,81.72479317856566
-
The watermark (c) ESRI Inc. will appear at the bottom left corner of the exported image.