Table of Contents

Class JpegOptions

Namespace
Aspose.Imaging.ImageOptions
Assembly
Aspose.Imaging.dll

Create high-quality JPEG images effortlessly with our API, offering adjustable levels of compression to optimize storage size without compromising image quality. Benefit from support for various compression types, near lossless coding, RGB and CMYK color profiles, as well as EXIF, JFIF image data, and XMP containers, ensuring versatile and customizable options for your image creation needs.

public class JpegOptions : ImageOptionsBase, IDisposable, IHasXmpData, IHasJpegExifData, IHasExifData, IHasMetadata
Inheritance
JpegOptions
Implements
Inherited Members

Constructors

JpegOptions()

Initializes a new instance of the JpegOptions class.

public JpegOptions()

JpegOptions(JpegOptions)

Initializes a new instance of the JpegOptions class.

public JpegOptions(JpegOptions jpegOptions)

Parameters

jpegOptions JpegOptions

The JPEG options.

Properties

BitsPerChannel

Gets or sets bits per channel for lossless jpeg image. Now we support from 2 to 8 bits per channel.

public byte BitsPerChannel { get; set; }

Property Value

byte

CmykColorProfile

The destination CMYK color profile for CMYK jpeg images. Use for saving images. Must be in pair with RGBColorProfile for correct color conversion.

public StreamSource CmykColorProfile { get; set; }

Property Value

StreamSource

ColorType

Gets or sets the color type for jpeg image.

public JpegCompressionColorMode ColorType { get; set; }

Property Value

JpegCompressionColorMode

Comment

Gets or sets the jpeg file comment.

public string Comment { get; set; }

Property Value

string

CompressionType

Gets or sets the compression type.

public JpegCompressionMode CompressionType { get; set; }

Property Value

JpegCompressionMode

DefaultMemoryAllocationLimit

Gets or sets the default memory allocation limit.

[Obsolete("Use Aspose.Imaging.Image.BufferSizeHint, Aspose.Imaging.ImageOptionsBase.BufferSizeHint or Aspose.Imaging.LoadOptions.BufferSizeHint instead.")]
public int DefaultMemoryAllocationLimit { get; set; }

Property Value

int

The default memory allocation limit.

ExifData

Get or set Exif data container.

public JpegExifData ExifData { get; set; }

Property Value

JpegExifData

HorizontalSampling

Gets or sets the horizontal subsamplings for each component.

public byte[] HorizontalSampling { get; set; }

Property Value

byte[]

Jfif

Gets or sets the jfif.

public JFIFData Jfif { get; set; }

Property Value

JFIFData

JpegLsAllowedLossyError

Gets or sets the JPEG-LS difference bound for near-lossless coding (NEAR parameter from the JPEG-LS specification).

public int JpegLsAllowedLossyError { get; set; }

Property Value

int

JpegLsInterleaveMode

Gets or sets the JPEG-LS interleave mode.

public JpegLsInterleaveMode JpegLsInterleaveMode { get; set; }

Property Value

JpegLsInterleaveMode

JpegLsPreset

Gets or sets the JPEG-LS preset parameters.

public JpegLsPresetCodingParameters JpegLsPreset { get; set; }

Property Value

JpegLsPresetCodingParameters

PreblendAlphaIfPresent

Gets or sets a value indicating whether red, green and blue components should be mixed with a background color, if alpha channel is present.

public bool PreblendAlphaIfPresent { get; set; }

Property Value

bool

Quality

Gets or sets image quality.

public int Quality { get; set; }

Property Value

int

RdOptSettings

Gets or sets the RD optimizer settings.

public RdOptimizerSettings RdOptSettings { get; set; }

Property Value

RdOptimizerSettings

The RD optimizer settings.

ResolutionUnit

Gets or sets the resolution unit.

public ResolutionUnit ResolutionUnit { get; set; }

Property Value

ResolutionUnit

RgbColorProfile

The destination RGB color profile for CMYK jpeg images. Use for saving images. Must be in pair with CMYKColorProfile for correct color conversion.

public StreamSource RgbColorProfile { get; set; }

Property Value

StreamSource

SampleRoundingMode

Gets or sets the sample rounding mode to fit an 8-bit value to an n-bit value. JpegOptions.BitsPerChannel

public SampleRoundingMode SampleRoundingMode { get; set; }

Property Value

SampleRoundingMode

ScaledQuality

The scaled quality.

public int ScaledQuality { get; }

Property Value

int

VerticalSampling

Gets or sets the vertical subsamplings for each component.

public byte[] VerticalSampling { get; set; }

Property Value

byte[]