System.IO.FileStream.WriteByte C# (CSharp) Method

WriteByte() public method

public WriteByte ( byte value ) : void
value byte
return void
        public override void WriteByte(byte value)
        {
            WriteByteCore(value);
        }

Usage Example

Example #1
0
        /// <summary>
        /// Do the conversion. 
        /// </summary>
        public void convert(Bitmap bm,FileStream fs)
        {
            int x,y;
              byte r,g,b;
              Color c;

              for(y=0;y<bm.Height;y++) {

            for(x=0;x<bm.Width;x++) {

              c=bm.GetPixel(x,y);

              // convert to 666

              r=(byte)(c.R & 0xFC);
              g=(byte)(c.G & 0xFC);
              b=(byte)(c.B & 0xFC);

              fs.WriteByte(b);
              fs.WriteByte(0);
              fs.WriteByte(r);
              fs.WriteByte(g);
            }
              }
        }
All Usage Examples Of System.IO.FileStream::WriteByte