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