示例#1
0
文件: Texture.cs 项目: mhvuze/tex2png
 public void Convert(Format format)
 {
     var converted = Convert(this, format);
     this.header = converted.header;
     this.pixelData = converted.pixelData;
 }
示例#2
0
文件: Texture.cs 项目: mhvuze/tex2png
 public Texture(Stream stream)
 {
     this.header = new Header(stream);
     this.pixelData = new byte[header.Width * header.Height * header.Format.GetBitsPerPixel() / 8];
     stream.Read(pixelData, 0, pixelData.Length);
 }
示例#3
0
文件: Texture.cs 项目: mhvuze/tex2png
 public Texture(int width, int height, Format format, byte[] pixelData)
 {
     this.header = new Header { Width = width, Height = height, Format = format };
     this.pixelData = pixelData;
 }
示例#4
0
文件: Texture.cs 项目: mhvuze/tex2png
 public Texture(Stream stream)
 {
     this.header    = new Header(stream);
     this.pixelData = new byte[header.Width * header.Height * header.Format.GetBitsPerPixel() / 8];
     stream.Read(pixelData, 0, pixelData.Length);
 }