Click or drag to resize

JpegEncoderSetDownsamplingFactors Method

Sets the downsampling factors used when compressing the image data. This will affect both quality and file size of the saved image.

Namespace:  Atalasoft.Imaging.Codec
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public void SetDownsamplingFactors(
	int[] horizontalFactors,
	int[] verticalFactors
)

Parameters

horizontalFactors
Type: SystemInt32
An array of horizontal factors used. This can be null (Nothing in VB) to use the default settings. See remarks below for more information.
verticalFactors
Type: SystemInt32
An array of vertical factors used. This can be null (Nothing in VB) to use the default settings. See remarks below for more information.
Remarks

The horizontal and vertical arrays represent the factors for each color channel. If the image is 8-bit there should only be a single element in the array. For 24-bit images there will be three elements.

The values of these factors range from 1 to 4, but not all value combinations will work. Those that do not work will throw an exception when saving the image.

See Also