CopyStream() public static method

public static CopyStream ( Stream stream ) : MemoryStream
stream Stream
return System.IO.MemoryStream
コード例 #1
0
ファイル: JpegImage.cs プロジェクト: goupviet/Nine.Imaging
        private void createFromStream(Stream imageData)
        {
            if (imageData == null)
            {
                throw new ArgumentNullException("imageData");
            }

            if (isCompressed(imageData))
            {
                m_compressedData = Utils.CopyStream(imageData);
                decompress();
            }
            else
            {
                throw new NotImplementedException("JpegImage.createFromStream(Stream)");
            }
        }
コード例 #2
0
        private void createFromStream(Stream imageData)
        {
            if (imageData == null)
            {
                throw new ArgumentNullException("imageData");
            }

            if (isCompressed(imageData))
            {
                m_compressedData = Utils.CopyStream(imageData);
                decompress();
            }
            else
            {
#if !SILVERLIGHT
                createFromBitmap(new Bitmap(imageData));
#else
                throw new NotImplementedException("JpegImage.createFromStream(Stream)");
#endif
            }
        }