static private ToByteArray ( Stream stream ) : byte[] | ||
stream | Stream | |
Результат | byte[] |
///<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); }
///<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); }
///<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)); }
///<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); }