コード例 #1
0
        private void applyParameters(DecompressionParameters parameters)
        {
            Debug.Assert(parameters != null);

            if (parameters.OutColorspace != Colorspace.Unknown)
            {
                m_decompressor.Out_color_space = (J_COLOR_SPACE)parameters.OutColorspace;
            }

            m_decompressor.Scale_num                = parameters.ScaleNumerator;
            m_decompressor.Scale_denom              = parameters.ScaleDenominator;
            m_decompressor.Buffered_image           = parameters.BufferedImage;
            m_decompressor.Raw_data_out             = parameters.RawDataOut;
            m_decompressor.Dct_method               = (J_DCT_METHOD)parameters.DCTMethod;
            m_decompressor.Dither_mode              = (J_DITHER_MODE)parameters.DitherMode;
            m_decompressor.Do_fancy_upsampling      = parameters.DoFancyUpsampling;
            m_decompressor.Do_block_smoothing       = parameters.DoBlockSmoothing;
            m_decompressor.Quantize_colors          = parameters.QuantizeColors;
            m_decompressor.Two_pass_quantize        = parameters.TwoPassQuantize;
            m_decompressor.Desired_number_of_colors = parameters.DesiredNumberOfColors;
            m_decompressor.Enable_1pass_quant       = parameters.EnableOnePassQuantizer;
            m_decompressor.Enable_external_quant    = parameters.EnableExternalQuant;
            m_decompressor.Enable_2pass_quant       = parameters.EnableTwoPassQuantizer;
            m_decompressor.Err.Trace_level          = parameters.TraceLevel;
        }
コード例 #2
0
ファイル: Jpeg.cs プロジェクト: capnmidnight/Juniper
#pragma warning disable IDE1006 // Naming Styles
        private void applyParameters(DecompressionParameters parameters)
#pragma warning restore IDE1006 // Naming Styles
        {
            Debug.Assert(parameters is object);

            if (parameters.OutColorspace != Colorspace.Unknown)
            {
                ClassicDecompressor.Out_color_space = (JColorSpace)parameters.OutColorspace;
            }

            ClassicDecompressor.Scale_num                = parameters.ScaleNumerator;
            ClassicDecompressor.Scale_denom              = parameters.ScaleDenominator;
            ClassicDecompressor.Buffered_image           = parameters.BufferedImage;
            ClassicDecompressor.Raw_data_out             = parameters.RawDataOut;
            ClassicDecompressor.Dct_method               = (JDctMethod)parameters.DCTMethod;
            ClassicDecompressor.Dither_mode              = (JDitherMode)parameters.DitherMode;
            ClassicDecompressor.Do_fancy_upsampling      = parameters.DoFancyUpsampling;
            ClassicDecompressor.Do_block_smoothing       = parameters.DoBlockSmoothing;
            ClassicDecompressor.Quantize_colors          = parameters.QuantizeColors;
            ClassicDecompressor.Two_pass_quantize        = parameters.TwoPassQuantize;
            ClassicDecompressor.Desired_number_of_colors = parameters.DesiredNumberOfColors;
            ClassicDecompressor.Enable_1pass_quant       = parameters.EnableOnePassQuantizer;
            ClassicDecompressor.Enable_external_quant    = parameters.EnableExternalQuant;
            ClassicDecompressor.Enable_2pass_quant       = parameters.EnableTwoPassQuantizer;
            ClassicDecompressor.Err.TraceLevel           = parameters.TraceLevel;
        }
コード例 #3
0
ファイル: Jpeg.cs プロジェクト: bluebirdtech/LibJpeg.Net
		private void applyParameters(DecompressionParameters parameters)
		{
			Debug.Assert(parameters != null);

			if (parameters.OutColorspace != Colorspace.Unknown)
				m_decompressor.Out_color_space = (J_COLOR_SPACE)parameters.OutColorspace;

			m_decompressor.Scale_num = parameters.ScaleNumerator;
			m_decompressor.Scale_denom = parameters.ScaleDenominator;
			m_decompressor.Buffered_image = parameters.BufferedImage;
			m_decompressor.Raw_data_out = parameters.RawDataOut;
			m_decompressor.Dct_method = (J_DCT_METHOD)parameters.DCTMethod;
			m_decompressor.Dither_mode = (J_DITHER_MODE)parameters.DitherMode;
			m_decompressor.Do_fancy_upsampling = parameters.DoFancyUpsampling;
			m_decompressor.Do_block_smoothing = parameters.DoBlockSmoothing;
			m_decompressor.Quantize_colors = parameters.QuantizeColors;
			m_decompressor.Two_pass_quantize = parameters.TwoPassQuantize;
			m_decompressor.Desired_number_of_colors = parameters.DesiredNumberOfColors;
			m_decompressor.Enable_1pass_quant = parameters.EnableOnePassQuantizer;
			m_decompressor.Enable_external_quant = parameters.EnableExternalQuant;
			m_decompressor.Enable_2pass_quant = parameters.EnableTwoPassQuantizer;
			m_decompressor.Err.Trace_level = parameters.TraceLevel;
		}