[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.ImageOptions

Class ImageOptions

Namespace
GrapeCity.Documents.Pdf
Assembly
GcDocs.Pdf.dll

Represents options controlling how native images are processed when inserted in a PDF file.

public class ImageOptions
Inheritance
object
ImageOptions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

ImageOptions()

public ImageOptions()

Properties

AlphaThreshold

Gets or sets the alpha threshold value. If all pixels of an image with the alpha channel have alpha values greater than or equal to this value, the alpha channel will not be saved, thus making the image and the whole PDF smaller. The default is 0xFF (i.e. all transparency is preserved). This property is ignored if SaveAllImagesAsJpeg is true.

public byte AlphaThreshold { get; set; }

Property Value

byte

CompressColors

Gets or sets a value indicating whether to apply a slight compression to color values. Unlike JPEG, this preserves transparency while still reducing the image size. The default is false.

public bool CompressColors { get; set; }

Property Value

bool

Format

Gets or sets the format to use when saving images. This property does not affect images added as RawImage.

The default is Auto.

public ImageOptions.ImageFormat Format { get; set; }

Property Value

ImageOptions.ImageFormat

JpegQuality

Gets or sets the JPEG image quality, in percent. This value must be between 0 (lowest quality, maximum compression) to 100 (highest quality, no compression). The default is 75.

public int JpegQuality { get; set; }

Property Value

int

SaveAllImagesAsJpeg

Gets or sets a value indicating whether all images should be converted to JPEG format when added to the PDF. The default is false. Note that any transparency (if present in the original image) is lost if this property is set to true. This property does not affect images added as RawImage.

[Obsolete("Use Format instead.")]
public bool SaveAllImagesAsJpeg { get; set; }

Property Value

bool

Methods

AssignFrom(ImageOptions)

Copies all property values from another object.

public void AssignFrom(ImageOptions source)

Parameters

source ImageOptions

The source object.

Reset()

Resets all properties to their default values.

public void Reset()