Holds parameters of image for decompression (IDecomressDesination)
コード例 #1
0
        public void SetImageAttributes(LoadedImageAttributes parameters)
        {
            if (parameters == null)
                throw new ArgumentNullException("parameters");

            m_parameters = parameters;
        }
コード例 #2
0
 public void SetImageAttributes(LoadedImageAttributes parameters)
 {
     m_jpegImage.Width = parameters.Width;
     m_jpegImage.Height = parameters.Height;
     m_jpegImage.BitsPerComponent = 8;
     m_jpegImage.ComponentsPerSample = (byte)parameters.ComponentsPerSample;
     m_jpegImage.Colorspace = parameters.Colorspace;
 }
コード例 #3
0
        public void SetImageAttributes(LoadedImageAttributes parameters)
        {
            if (parameters.Width > Image.MaxWidth || parameters.Height > Image.MaxHeight)
            {
                throw new ArgumentOutOfRangeException(
                    $"The input jpg '{ parameters.Width }x{ parameters.Height }' is bigger then the max allowed size '{ Image.MaxWidth }x{ Image.MaxHeight }'");
            }

            m_jpegImage.Width = parameters.Width;
            m_jpegImage.Height = parameters.Height;
            m_jpegImage.BitsPerComponent = 8;
            m_jpegImage.ComponentsPerSample = (byte)parameters.ComponentsPerSample;
            m_jpegImage.Colorspace = parameters.Colorspace;
        }
コード例 #4
0
ファイル: Jpeg.cs プロジェクト: bluebirdtech/LibJpeg.Net
		private LoadedImageAttributes getImageParametersFromDecompressor()
		{
			LoadedImageAttributes result = new LoadedImageAttributes();
			result.Colorspace = (Colorspace)m_decompressor.Out_color_space;
			result.QuantizeColors = m_decompressor.Quantize_colors;
			result.Width = m_decompressor.Output_width;
			result.Height = m_decompressor.Output_height;
			result.ComponentsPerSample = m_decompressor.Out_color_components;
			result.Components = m_decompressor.Output_components;
			result.ActualNumberOfColors = m_decompressor.Actual_number_of_colors;
			result.Colormap = m_decompressor.Colormap;
			result.DensityUnit = m_decompressor.Density_unit;
			result.DensityX = m_decompressor.X_density;
			result.DensityY = m_decompressor.Y_density;
			return result;
		}