Beispiel #1
0
        /// <summary>
        /// Saves the encoded texture to the specified stream.
        /// </summary>
        /// <param name="destination">The stream to save the texture to.</param>
        public void Save(Stream destination)
        {
            MemoryStream textureStream = EncodeTexture();

            textureStream.Position = 0;
            PTStream.CopyTo(textureStream, destination);
        }
        /// <summary>
        /// Saves the encoded palette to the specified stream.
        /// </summary>
        /// <param name="destination">The stream to save the texture to.</param>
        public void Save(Stream destination)
        {
            MemoryStream paletteStream = EncodePalette();

            paletteStream.Position = 0;
            PTStream.CopyTo(paletteStream, destination);
        }
Beispiel #3
0
 /// <summary>
 /// Saves the encoded texture to the specified path.
 /// </summary>
 /// <param name="path">Name of the file to save the data to.</param>
 public void Save(string path)
 {
     using (FileStream destination = File.Create(path))
     {
         MemoryStream textureStream = EncodeTexture();
         textureStream.Position = 0;
         PTStream.CopyTo(textureStream, destination);
     }
 }
 /// <summary>
 /// Saves the encoded palette to the specified path.
 /// </summary>
 /// <param name="path">Name of the file to save the data to.</param>
 public void Save(string path)
 {
     using (FileStream destination = File.Create(path))
     {
         MemoryStream paletteStream = EncodePalette();
         paletteStream.Position = 0;
         PTStream.CopyTo(paletteStream, destination);
     }
 }