Esempio n. 1
0
 public PcxHeader(Stream input)
 {
     this.id           = PcxId.ZSoftPCX;
     this.version      = PcxVersion.Version3_0;
     this.encoding     = PcxEncoding.RunLengthEncoded;
     this.colorMap     = new byte[0x30];
     this.filler       = new byte[0x3a];
     this.id           = (PcxId)this.ReadByte(input);
     this.version      = (PcxVersion)this.ReadByte(input);
     this.encoding     = (PcxEncoding)this.ReadByte(input);
     this.bitsPerPixel = this.ReadByte(input);
     this.xMin         = this.ReadUInt16(input);
     this.yMin         = this.ReadUInt16(input);
     this.xMax         = this.ReadUInt16(input);
     this.yMax         = this.ReadUInt16(input);
     this.hDpi         = this.ReadUInt16(input);
     this.vDpi         = this.ReadUInt16(input);
     for (int i = 0; i < this.colorMap.Length; i++)
     {
         this.colorMap[i] = this.ReadByte(input);
     }
     this.reserved     = this.ReadByte(input);
     this.nPlanes      = this.ReadByte(input);
     this.bytesPerLine = this.ReadUInt16(input);
     this.paletteInfo  = (PcxPaletteType)((byte)this.ReadUInt16(input));
     for (int j = 0; j < this.filler.Length; j++)
     {
         this.filler[j] = this.ReadByte(input);
     }
 }
Esempio n. 2
0
 public PcxHeader(Stream input)
 {
     id           = (PcxId)ReadByte(input);
     version      = (PcxVersion)ReadByte(input);
     encoding     = (PcxEncoding)ReadByte(input);
     bitsPerPixel = ReadByte(input);
     xMin         = ReadUInt16(input);
     yMin         = ReadUInt16(input);
     xMax         = ReadUInt16(input);
     yMax         = ReadUInt16(input);
     hDpi         = ReadUInt16(input);
     vDpi         = ReadUInt16(input);
     for (int i = 0; i < colorMap.Length; i++)
     {
         colorMap[i] = ReadByte(input);
     }
     reserved     = ReadByte(input);
     nPlanes      = ReadByte(input);
     bytesPerLine = ReadUInt16(input);
     paletteInfo  = (PcxPaletteType)ReadUInt16(input);
     for (int i = 0; i < filler.Length; i++)
     {
         filler[i] = ReadByte(input);
     }
 }
Esempio n. 3
0
 public PcxHeader(Stream input)
 {
     this.id = PcxId.ZSoftPCX;
     this.version = PcxVersion.Version3_0;
     this.encoding = PcxEncoding.RunLengthEncoded;
     this.colorMap = new byte[0x30];
     this.filler = new byte[0x3a];
     this.id = (PcxId)this.ReadByte(input);
     this.version = (PcxVersion)this.ReadByte(input);
     this.encoding = (PcxEncoding)this.ReadByte(input);
     this.bitsPerPixel = this.ReadByte(input);
     this.xMin = this.ReadUInt16(input);
     this.yMin = this.ReadUInt16(input);
     this.xMax = this.ReadUInt16(input);
     this.yMax = this.ReadUInt16(input);
     this.hDpi = this.ReadUInt16(input);
     this.vDpi = this.ReadUInt16(input);
     for (int i = 0; i < this.colorMap.Length; i++)
     {
         this.colorMap[i] = this.ReadByte(input);
     }
     this.reserved = this.ReadByte(input);
     this.nPlanes = this.ReadByte(input);
     this.bytesPerLine = this.ReadUInt16(input);
     this.paletteInfo = (PcxPaletteType)((byte)this.ReadUInt16(input));
     for (int j = 0; j < this.filler.Length; j++)
     {
         this.filler[j] = this.ReadByte(input);
     }
 }