Setting output image quality
The following code example uses an IActiveView and a ResampleRatio (resampling ratio). The resampling ratio works the opposite way that you would expect—a value of 1 is the least resampling and, therefore, gives the best output image quality.
    [Java]
        
static void setOutputQuality(IActiveView docActiveView, int iResampleRatio)throws
    Exception{
    /*
     * This function sets the OutputImageQuality for the active view. If the active
     * view is a pagelayout, then it must also set the output image quality for each
     * of the maps in the pagelayout.
     */
    IGraphicsContainer container;
    IElement element;
    IOutputRasterSettings settings;
    IMapFrame mapFrame;
    IActiveView tempActiveView;
    if (docActiveView instanceof IMap){
        settings = (IOutputRasterSettings)docActiveView.getScreenDisplay()
            .getDisplayTransformation();
        settings.setResampleRatio(iResampleRatio);
    }
    else if (docActiveView instanceof IPageLayout){
        // Assign ResampleRatio for PageLayout
        settings = (IOutputRasterSettings)docActiveView.getScreenDisplay()
            .getDisplayTransformation();
        settings.setResampleRatio(iResampleRatio);
        // and assign ResampleRatio to the maps in the PageLayout.
        container = (IGraphicsContainer)docActiveView;
        container.reset();
        element = container.next();
        while (element != null){
            if (element instanceof IMapFrame){
                mapFrame = (IMapFrame)element;
                tempActiveView = (IActiveView)mapFrame.getMap();
                settings = (IOutputRasterSettings)tempActiveView.getScreenDisplay()
                    .getDisplayTransformation();
                settings.setResampleRatio(iResampleRatio);
            }
            element = container.next();
        }
        mapFrame = null;
        container = null;
        tempActiveView = null;
    }
    settings = null;
}
      | Development licensing | Deployment licensing | 
|---|---|
| Engine Developer Kit | ArcGIS for Desktop Basic | 
| ArcGIS for Desktop Basic | ArcGIS for Desktop Standard | 
| ArcGIS for Desktop Standard | ArcGIS for Desktop Advanced | 
| ArcGIS for Desktop Advanced | Engine |