Example #1
0
 public static Tex FromFile(string fileName)
 {
     using (var reader = new StreamReader(fileName))
     {
         var tex = new Tex(reader.BaseStream);
         return(tex);
     }
 }
Example #2
0
        public static Bitmap ToBitmap(Stream texData, int preferPalette = 0)
        {
            // Always reset the stream position just in case.
            texData.Position = 0;
            var tex = new Tex(texData);

            return(tex.ToBitmap(preferPalette));
        }