<< Click to Display Table of Contents >> PictureExportDither |
[Windows Platform Only, Professional Edition and above]
Specifies, if an exported image shall be dithered to a lower color resolution when written to file. This is very useful, if you want to export smaller images (regarding their size in bytes) - or if you want to fax (in b/w) a true-color image - and to keep the visual information at a high quality.
property long VPE.PictureExportDither
read; runtime only
Possible Values:
ActiveX / VCL |
Value |
Enum |
Comment |
PICEXP_DITHER_NONE |
0 |
DitherNone |
|
PICEXP_DITHER_MONO |
1 |
DitherMono |
|
PICEXP_DITHER_256 |
3 |
Dither256 |
|
PICEXP_DITHER_256_WU |
4 |
Dither256Wu |
|
Default:
PICEXP_DITHER_NONE
Remarks:
For PICEXP_DITHER_MONO: images are dithered with the Floyd-Steinberg dithering algorithm. The source bitmap may have any of the following color depths: 1, 4, 8, 16, 24, 32 bits. If the source bitmap is a monochrome bitmap, VPE creates a copy without dithering.
For PICEXP_DITHER_256: this only works, if the source bitmap is 24-bit, i.e. PictureExportColorDepth is PICEXP_COLOR_TRUE. Images are not dithered, instead VPE uses color-reduction (NeuQuant neural-net quantization algorithm by Anthony Dekker). This algorithm creates very good results but is rather slow.
For PICEXP_DITHER_256_WU: this only works, if the source bitmap is 24-bit, i.e. PictureExportColorDepth is PICEXP_COLOR_TRUE. Images are not dithered, instead VPE uses color-reduction (Xiaolin Wu color quantization algorithm). This algorithm is much faster than the NeuQuant algorithm, but does not create as good results. In some cases it might lead to false colors.
Example:
ActiveX / VCL:
Doc.PictureExportColorDepth = PICEXP_COLOR_256
Doc.PictureExportDither = PICEXP_DITHER_MONO
Doc.PictureExportPage("test.bmp", 1)
.NET:
Doc.PictureExportColorDepth = PictureExportColorDepth.Color256
Doc.PictureExportDither = PictureExportDither.DitherMono
Doc.PictureExportPage("test.bmp", 1)
Instructs VPE, to generate from page one of the document internally a 256 color image first, and to dither it down afterwards to b / w (monochrome) when writing it to file.