Original User: chri6255Hi Jim, Here is an example of the syntax you would you for a rendering rule performing a "Streach" raster funtion. There is a link below of different ways you can use the render rule to manipulate your image service.
RestLayerProperties();
imgLayer.BandIds = new int[] {0,1,2,3};
IDictionary<string, object> functionArguments = new Dictionary<string, object>();
functionArguments.Add("StretchType", iStretchType);
functionArguments.Add("NumberOfStandardDeviations", numberOfStandardDeviations);
functionArguments.Add("Statistics", statistics);
functionArguments.Add("Gamma", gamma);
imgLayer.RenderingRule = new RenderingRule()
{
RasterFunctionName = "Stretch",
RasterFunctionArguments = functionArguments,
VariableName = "Raster"
};
imgLayer.Refresh();
Here is a link to the documentation on what types of rendering rules you can use against your image service.http://sampleserver3.arcgisonline.com/ArcGIS/SDK/REST/israsterfunctions.html