Compress() 공개 메소드

Compresses any image described as ICompressSource to JPEG
public Compress ( IRawImage source, Stream output ) : void
source IRawImage Contains description of input image
output Stream Stream for output of compressed JPEG
리턴 void
예제 #1
0
        private void compress(IRawImage source, CompressionParameters parameters)
        {
            Debug.Assert(source != null);

            if (!needCompressWith(parameters))
            {
                return;
            }

            m_compressedData        = new MemoryStream();
            m_compressionParameters = new CompressionParameters(parameters);

            Jpeg jpeg = new Jpeg();

            jpeg.CompressionParameters = m_compressionParameters;
            jpeg.Compress(source, m_compressedData);
        }
예제 #2
0
        private void Compress(IRawImage source, CompressionParameters parameters)
        {
            Debug.Assert(source is object);

            if (!NeedCompressWith(parameters))
            {
                return;
            }

            m_compressedData        = new MemoryStream();
            m_compressionParameters = new CompressionParameters(parameters);

            var jpeg = new Jpeg
            {
                CompressionParameters = m_compressionParameters
            };

            jpeg.Compress(source, m_compressedData);
        }
예제 #3
0
        private void compress(IRawImage source, CompressionParameters parameters)
        {
            Debug.Assert(source != null);

            if (!needCompressWith(parameters))
                return;

            m_compressedData = new MemoryStream();
            m_compressionParameters = new CompressionParameters(parameters);

            Jpeg jpeg = new Jpeg();
            jpeg.CompressionParameters = m_compressionParameters;
            jpeg.Compress(source, m_compressedData);
        }