static PdnFileTypes() { string[] extensions = new string[] { ".tif", ".tiff" }; Tiff = new GdiPlusFileType("TIFF", ImageFormat.Tiff, false, extensions); Png = new PngFileType(); Pdn = new PdnFileType(); Tga = new TgaFileType(); Dds = new DdsFileType(); fileTypes = new FileType[] { Pdn, Bmp, Gif, Jpeg, Png, Tiff, Tga, Dds }; }
public void Flush() { byte num = (byte)((this.rlePacket ? 0x80 : 0) + ((byte)(this.packetLength - 1))); this.output.WriteByte(num); int num2 = this.rlePacket ? 1 : this.packetLength; for (int i = 0; i < num2; i++) { TgaFileType.WriteColor(this.output, this.packetColors[i], this.bitDepth); } this.packetLength = 0; }