Exemple #1
0
 public void Convert(Format format)
 {
     var converted = Convert(this, format);
     this.header = converted.header;
     this.pixelData = converted.pixelData;
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 public Texture(int width, int height, Format format, byte[] pixelData)
 {
     this.header = new Header { Width = width, Height = height, Format = format };
     this.pixelData = pixelData;
 }
Exemple #4
0
 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);
 }