ToByteArray() статический приватный Метод

static private ToByteArray ( Stream stream ) : byte[]
stream Stream
Результат byte[]
Пример #1
0
        ///<summary>
        /// Initializes a new instance of the ImageProfile class.
        ///</summary>
        ///<param name="name">The name of the profile.</param>
        ///<param name="stream">A stream containing the profile.</param>
        public ImageProfile(string name, Stream stream)
        {
            Throw.IfNullOrEmpty(nameof(name), name);

            Name = name;
            Data = StreamHelper.ToByteArray(stream);
        }
Пример #2
0
 ///<summary>
 /// Adds the image(s) from the specified stream to the collection.
 ///</summary>
 ///<param name="stream">The stream to read the images from.</param>
 ///<param name="readSettings">The settings to use when reading the image.</param>
 ///<exception cref="MagickException"/>
 public void AddRange(Stream stream, MagickReadSettings readSettings)
 {
     AddRange(StreamHelper.ToByteArray(stream), readSettings);
 }
Пример #3
0
 ///<summary>
 /// Read only metadata and not the pixel data from all image frames.
 ///</summary>
 ///<param name="stream">The stream to read the image data from.</param>
 ///<exception cref="MagickException"/>
 public void Ping(Stream stream)
 {
     Ping(StreamHelper.ToByteArray(stream));
 }
Пример #4
0
 ///<summary>
 /// Read all image frames.
 ///</summary>
 ///<param name="stream">The stream to read the image data from.</param>
 ///<param name="readSettings">The settings to use when reading the image.</param>
 ///<exception cref="MagickException"/>
 public void Read(Stream stream, MagickReadSettings readSettings)
 {
     Read(StreamHelper.ToByteArray(stream), readSettings);
 }