Document Solutions for PDF
GrapeCity.Documents.Pdf Assembly / GrapeCity.Documents.Pdf Namespace / ImageOptions.ImageFormat Enumeration

In This Topic
    ImageOptions.ImageFormat Enumeration
    In This Topic
    Defines formats that can be used to encode images in a PDF.
    Syntax
    'Declaration
     
    Public Enum ImageOptions.ImageFormat 
       Inherits System.Enum
    public enum ImageOptions.ImageFormat : System.Enum 
    Members
    MemberDescription
    AutoSelect the optimal format automatically based on the particular image and document options (recommended).

    The following rules are used:

    • If the image is a JPEG or a JPEG2000, the image data is written as is without any additional processing.
    • If the image contains transparency, Raw is used.
    • If GcPdfDocument.CompressionLevel is System.IO.Compression.CompressionLevel.NoCompression, Jpeg is used.
    • Otherwise the format is selected that provides the minimal data size for the image.
    JpegUse JPEG to encode images.

    Note that when using this format, any transparency that may be present in an original image will be lost, as JPEG does not support transparency.

    RawDo not encode image data.

    When using this format, the GcPdfDocument.CompressionLevel affects the final PDF size, and in combination with System.IO.Compression.CompressionLevel.Optimal it may produce better compression than JPEG for certain types of images (e.g. screenshots of mostly text screens).

    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             GrapeCity.Documents.Pdf.ImageOptions.ImageFormat

    See Also