ImageMan.Net Version 3 Summer 2012 Release
Compression Property
See Also  Send Feedback
DTI.ImageMan.Codecs Namespace > PdfEncoder Class : Compression Property





Glossary Item Box

Determines PdfCompression for the Pdf Document

Syntax

Visual Basic (Declaration) 
Public Property Compression As PdfCompression
Visual Basic (Usage)Copy Code
Dim instance As PdfEncoder
Dim value As PdfCompression
 
instance.Compression = value
 
value = instance.Compression
C# 
public PdfCompression Compression {get; set;}
JScript 
public function get,set Compression : PdfCompression
Managed Extensions for C++ 
public: __property PdfCompression get_Compression();
public: __property void set_Compression( 
   PdfCompression value
);
C++/CLI 
public:
property PdfCompression Compression {
   PdfCompression get();
   void set (    PdfCompression value);
}

Remarks

The following compression methods are supported by the PDF Exporter.

PdfCompression Options Supported BitDepths Description
DefaultPdfCompression 2,4,8,24 Will choose the best default option based on color depth. CCITTFax4Decode for monochrome images, JPEG compression for 24 bit, and FLATE for all others.
CCITTFax3Decode 2 CCITT Group 3 compression is the standard in fax communications.
CCITTFax4Decode 2 CCITT Group 4 compression is a two dimensional compression method. And is one of the best for black and white images that have around 5-10% coverage and are mainly text or line art.
RunLengthDecode 2 Run Length Decode or RLE is not optimal and can lead to larger images then ones that are not compressed at all in worst case scenarios.
LZWDecode 2,4,8,24 LZW decoding provides excellent compression for images with palettes including black and white images that have higher coverage, and color images made up of either text or graphics. Our implementation of LZW also includes a predictor which yields reasonable lossless compression for 24 bit color images as well.
FLATE 2,4,8,24 FLATE or PNG compression is probably the best choice if you need to pick one compression method for all color depths. It is also the best choice if you need lossless compression for 24 bit images. Flate compression has support for the standard PNG filters using the FlateFilter property. As well as the ability to specify the amount of compression using the FlateCompressionLevel property on a level from 1 to 9, 9 is the highest compression, 8 is the default.
JPEG 8 bit grayscale, 24

JPEG encoding is an excellent choice for photographs or computer rendered images. It is lossy and therefore even though it has excellent compression some loss of information can happen, especially when two colors of sharp contrast form a sharp line, there can be some artifacts or haloing in the adjacent pixels. The PdfEncoder property lets you specify the compression from 1 to 99 with 99 being the highest image quality, 75 is the default.

In order for an image to be saved in grayscale format it must have a ramped palette. A ramped palette is created when the ImageMan Palette is created using the GrayScale PaletteType:DTI::ImageMan::ImPalette::PaletteType:.

When using the ModifyBitDepth Command:DTI::ImageMan::Commands: set the Palette Option:DTI::ImageMan::Commands::ModifyBitDepthCommand: to Custom:DTI::ImageMan::Commands: and the Palette Property:DTI::ImageMan::Commands: to a new ImageMan Palette using the GrayScale PaletteType:DTI::ImageMan::ImPalette::PaletteType:.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2014 Data Techniques, Inc. All Rights Reserved.