IPNG
The IPNG interface is designed to configure the output files to be saved in the PNG format.
Properties
Defines the bit depth of the resulting image measured as the number of bits representing each pixel. It is both readable and writable.
Constant | Value | Description |
---|---|---|
CS_BLACKWHITE | 1 | Black and white image (1 bit per pixel) |
CS_16COLORS | 4 | Color image, 16 colors (4 bits per pixel) |
CS_16GRAYSCALE | 132 | Grayscale image (16 hues, 4 bits per pixel) |
CS_256COLORS | 8 | Color image, 256 colors (8 bits per pixel) |
CS_256GRAYSCALE | 136 | Grayscale image (256 hues, 8 bits per pixel) |
CS_TRUECOLOR | 24 | True color image (24 bits per pixel) |
Integer Compression
Defines the degree of compression of the resulting image file. The greater it is, the smaller the output file will be, and the longer the conversion process will take. Valid range: between 0 and 9. It is both readable and writable.
Enum Smoothing
Defines the dithering mode applied to half-tone transitions and is used to reduce stepwise rendering when representing downsampled images. Dithering is applied only if the ColorSpace property has one of the following values: CS_BLACKWHITE, CS_16COLORS, CS_16GRAYSCALE, CS_256COLORS. It is both readable and writable.
Constant | Value | Description |
---|---|---|
SM_HQ | 1 | High-quality dithering is used to optimize for output image quality |
SM_FAST | 0 | Fast dithering is used to optimize the conversion speed |
Examples
Visual Basic 6
Dim objUDC As IUDC Dim itfPrinter As IUDCPrinter Dim itfProfile As IProfile Set objUDC = New UDC.APIWrapper Set itfPrinter = objUDC.Printers("Universal Document Converter") Set itfProfile = itfPrinter.Profile ' Set PNG as current output file format itfProfile.FileFormat.ActualFormat = FMT_PNG itfProfile.FileFormat.PNG.ColorSpace = CS_GRAYSCALE_16 itfProfile.FileFormat.PNG.Smoothing = SM_HQ itfProfile.FileFormat.PNG.Compression = 5