Esempio n. 1
0
        /// <summary>
        /// Create a <see cref="IWICStream"/> from given data.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="data">Data to initialize with.</param>
        /// <returns>New instance of <see cref="IWICStream"/> or throws exception.</returns>
        public IWICStream CreateStream <T>(T[] data) where T : unmanaged
        {
            IWICStream wicStream = CreateStream_();

            wicStream.Initialize(data).CheckError();
            return(wicStream);
        }
Esempio n. 2
0
        /// <summary>
        /// Create a <see cref="IWICStream"/> from another stream. Access rights are inherited from the underlying stream
        /// </summary>
        /// <param name="comStream">The initialize stream.</param>
        /// <returns>New instance of <see cref="IWICStream"/> or throws exception.</returns>
        public IWICStream CreateStream(IStream comStream)
        {
            IWICStream stream = CreateStream_();

            stream.Initialize(comStream).CheckError();
            return(stream);
        }
Esempio n. 3
0
        /// <summary>
        /// Create a <see cref="IWICStream"/> from another stream. Access rights are inherited from the underlying stream
        /// </summary>
        /// <param name="stream">The initialize stream.</param>
        /// <returns>New instance of <see cref="IWICStream"/> or throws exception.</returns>
        public IWICStream CreateStream(Stream stream)
        {
            IWICStream wicStream = CreateStream_();

            wicStream.Initialize(stream).CheckError();
            return(wicStream);
        }
Esempio n. 4
0
        /// <summary>
        /// Create a <see cref="IWICStream"/> from file name.
        /// </summary>
        /// <param name="fileName">The file name.</param>
        /// <param name="access">The <see cref="FileAccess"/> mode.</param>
        /// <returns>New instance of <see cref="IWICStream"/> or throws exception.</returns>
        public IWICStream CreateStream(string fileName, FileAccess access)
        {
            IWICStream stream = CreateStream_();

            stream.Initialize(fileName, access).CheckError();
            return(stream);
        }