VintaSoft Imaging .NET SDK 12.3: Documentation for .NET developer
Vintasoft.Imaging.Codecs.Encoders Namespace / JpegEncoderSettings Class / SamplingFactors Property
Syntax Exceptions Remarks Requirements SeeAlso
In This Topic
    SamplingFactors Property (JpegEncoderSettings)
    In This Topic
    Gets or sets sampling factors for the JPEG image.
    Syntax
    'Declaration
    
    <BrowsableAttribute(False)>
    Public Property SamplingFactors As System.Int32[]
    
    
    [Browsable(False)]
    public System.Int32[] SamplingFactors { get; set; }
    
    
    [Browsable(False)]
    public: __property System.Int32[] get_SamplingFactors();
    public: __property void set_SamplingFactors(
    System.Int32[]* value
    );
    [Browsable(False)]
    public:
    property System.Int32[] SamplingFactors { System.Int32[] get(); void set(array<System.Int32>^ value); }

    Property Value

    The array must contain from 2 to 8 elements, each consecutive pair representing horizontal and vertical sampling factors for a component with corresponding index. Number of sampling factors must be sufficient for components of JPEG image. Each sampling factor must be in range from 1 to 4.
    Default value is null.
    Exceptions
    ExceptionDescription
    Thrown if sampling factor count is less than 2 or greater than 8.
    Remarks

    If value of this property is null then sampling factors will be generated depending on the value of the IsSubsamplingDisabled property. Otherwise, value of the IsSubsamplingDisabled is ignored, and specified factors are used.

    Requirements

    Target Platforms: .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also