Create a Default Raster RasterRenderer


This sample code demonstrates how one can change the default behavior that ArcMap or ArcCatalog uses to render raster layers. For Example, in 8.2, when a 1 bit raster or a raster catalog consisting of 1 bit raster datasets is added to ArcMap, value 1 is renderered as white and value 0 is rendered as black. One can change this behavior by creating a Raster Renderer DLL through implementing the IRasterRendererMaker interface, so that the default raster renderer renders 1 bit raster datasets with value 1 as transparent and value 0 as black.

How to use:
  1. Register this DLL file using regsvr32.exe.
  2. Double click "categories.exe" in your ArcGIS bin directory ("c:\arcgis\arcexe82\bin").
  3. Scroll down and find "ESRI RasterRenderer Makers" folder.
  4. This folder contains one record. Highligh this folder, click the "Add Object" button and add this DLL file.
  5. Start ArcMap and add your 1 bit TIFFs or raster catalogs with 1 bit TIFFs.


Difficulty: Intermediate

Visual Basic
File Description
RasterRenderMaker_1bit_TIFF.cls Class module that implements IRasterRendererMaker interface.

Key CoClasses: Raster, RasterUniqueValueRenderer, RasterRendererMaker
Key Interfaces: IRasterRendererMaker