These options control the behavior of the image converter used by Document Conversion Service.  Table values in bold text are the default value for that setting.

 

Sample Profile

 
<?xml version="1.0" encoding="utf-8"?>
<Profile Type="0"
         DisplayName="Image Converter 300dpi"
         Description ="Create images using the PEERNET image converter.">
  <Settings>
 
    <!-- Image Conversion options, use LEAD first -->
    <add Name="ConverterPlugIn.PNImageConverter.ImageToolkitOrder" Value="LEAD;WIC"/>
    <add Name="ConverterPlugIn.PNImageConverter.LEADScalingMode" Value="BICUBIC"/>

    <add Name="ConverterPlugIn.PNImageConverter.WICScalingMode" Value="BICUBIC"/>

 

    <!-- Background color for transparent images, white is default -->

    <add Name="ConverterPlugIn.PNImageConverter.AlphaBackgroundColorRGB" Value="255,255,255"/>

 
    <!-- Output file options -->
    <add Name="Devmode settings;Resolution" Value="300"/>
    <add Name="Save;Output File Format" Value="TIFF Multipaged"/>
    ...
    
  </Settings>
</Profile>

 

 

Code Sample - C#

 
PNDocConvQueueServiceLib.PNDocConvQueueItem item = null;
 
// Create the conversion item
item = new PNDocConvQueueServiceLib.PNDocConvQueueItem();
 
// Set conversion settings
item.Set("ConverterPlugIn.PNImageConverter.ImageToolkitOrder","LEAD;WIC");
item.Set("ConverterPlugIn.PNImageConverter.LEADScalingMode","BICUBIC");
item.Set("ConverterPlugIn.PNImageConverter.WICScalingMode","BICUBIC");

 

// Background color for transparent images, white is default
item.Set("ConverterPlugIn.PNImageConverter.AlphaBackgroundColorRGB","255,255,255");

 
// Output file options
item.Set("Devmode settings;Resolution","300");
item.Set("Save;Output File Format","TIFF Multipaged");
 
...
// convert the file
item.Convert("PEERNET Image Converted",
             @"C:\Test\screenshot.png",
             @"C:\Test\Out\ConvertedImage");

 

Code Sample - VB.NET

 

Dim item As PNDocConvQueueServiceLib.IPNDocConvQueueItem

 

 ' Create the conversion item

item = New PNDocConvQueueServiceLib.PNDocConvQueueItem()

 

' Set conversion settings

item.Set("ConverterPlugIn.PNImageConverter.ImageToolkitOrder","LEAD;WIC")

item.Set("ConverterPlugIn.PNImageConverter.LEADScalingMode","BICUBIC")

item.Set("ConverterPlugIn.PNImageConverter.WICScalingMode","BICUBIC")

 

' Background color for transparent images, white is default
item.Set("ConverterPlugIn.PNImageConverter.AlphaBackgroundColorRGB","255,255,255")

 

 

item.Set("Devmode settings;Resolution","300")
item.Set("Save;Output File Format","TIFF Multipaged")

 

...

' convert the file

item.Convert("PEERNET Image Converted", _

             "C:\Test\screenshot.png", _

             "C:\Test\Out\ConvertedImage")

 

 

Conversion Settings - Toolkits and Scaling Modes

Name:

ConverterPlugIn.PNImageConverter.ImageToolkitOrder

 

This string lists, in the order in which they will be used, the image tool kits that PEERNET Image Converter will use to try and convert an image. The default value, "LEAD;WIC", will use LEAD first and then try WIC (Windows Imaging Component) if the image could not be converted. The two tool kits support opening and reading different file formats; see Supported Image File Formats below for a complete list. You do not need to install anything extra to use these either of these tool kits. The LEAD tool kit is bundled with Document Conversion Service and the Windows Image Component is part of the Windows operating system.

 

 

Values:

LEAD;WIC - use LEAD first, then try WIC if the image could not be converted.

WIC;LEAD - use WIC first, then try LEAD if the image could not be converted.

LEAD - only use LEAD.

WIC - only use WIC.

 

Name:

ConverterPlugIn.PNImageConverter.LEADScalingMode

 

This is the sampling or filtering mode to use when scaling an image. An image needs to be scaled when the resolution of the source image and destination image are not the same.

 

Values:

NORMAL - Nearest neighbor, this is the fasted mode and often can produce the smallest image.

LINEAR - A linear interpolation algorithm, slower than NORMAL but better image quality.

BICUBIC - Bicubic interpolation resizing, slower than LINEAR, but better image quality.

 

Name:

ConverterPlugIn.PNImageConverter.WICScalingMode

 

This is the sampling or filtering mode to use when scaling an image. An image needs to be scaled when the resolution of the source image and destination image are not the same.

 

Values:

NORMAL - Uses nearest neighbor scaling. This is nearest neighbor scaling, which is the fastest mode and often can produce the smallest image. The tradeoff is a lower image quality.

LINEAR - A bilinear interpolation algorithm where the weighted average of a 2x2 grid is used to compute the pixel values of the new image. Better quality than NORMAL.

BICUBIC - The new pixel values are computed using a weighted average of a 4x4 grid.

FANT - This scaling mode produces the best quality images but is slower and more CPU intensive than the others.

 

Name:

ConverterPlugIn.PNImageConverter.KeepSourceImageResolution

 

Optionally keep the output image's resolution the same as source image.  Note that fax mode and other image option actions (Image Options) will still override the end result. Overrides the Devmode settings;Resolution settings from Devmode settings.

 

Values:

True - Create the new image with the same resolution as the original image.

False - Creates the new image with the resolution specified in the Devmode settings;Resolution setting.

 

Name:

ConverterPlugIn.PNImageConverter.ResampleImageToMaxWidthOrHeightInPixels

 

Dynamically sample the output image to a specific maximum width or height, which ever criteria is met first. The desired dimension is specified in pixels. Note that fax mode and other image option actions (Image Options) will still override the end result.

 

Values:

The desired maximum width or height in pixels.

 

Name:

ConverterPlugIn.PNImageConverter.AlphaBackgroundColorRGB

 

For images that support transparency, or alphablending, optionally set the desired background color when converting the image. The default background color is White.

Values:

The desired background color set as RGB triplet separated by commas.

 

255,255,255 - White

0,0,0 - Black

 

 

Supported Image File Formats

The table below lists the image formats supported by each tool kit.

Image Format

LEAD

WIC

CServe Portable Network Graphics images (*.png)

Graphics Interchange Format image files (*.gif)

Icon Format (*.ico)

 

JPEG images (*.jpg)

TIFF images (*.tif)

Windows Bitmap images (*.bmp)

Windows Media Photo (*.wdp, *.hdp, *.jxr)

 

ZSoft PCX images (*.pcx)

 

ZSoft DCX images (*.dcx)