internal override void Write(GifWriter gifWriter)
        {
            gifWriter.WriteUInt16(width);
            gifWriter.WriteUInt16(height);

            Byte flags = (byte)(Log2(globalColorTableSize) | (globalColorTableSorted ? 0x08 : 0) | ((colorResolution - 1) << 4) | (globalColorTableFlag ? 0x80 : 0));

            gifWriter.WriteByte(flags);

            gifWriter.WriteByte(backgroundColorIndex);
            gifWriter.WriteByte(pixelAspectRatio);
        }
Exemplo n.º 2
0
        internal override void Write(GifWriter gifWriter)
        {
            gifWriter.WriteByte(0x2C);

            gifWriter.WriteUInt16(left);
            gifWriter.WriteUInt16(top);

            gifWriter.WriteUInt16(width);
            gifWriter.WriteUInt16(height);

            Byte flags = (byte)(Log2(localColorTableSize) | (localColorTableSorted ? 0x20 : 0) | (interlaced ? 0x40 : 0) | (localColorTableFlag ? 0x80 : 0));

            gifWriter.WriteByte(flags);
        }
Exemplo n.º 3
0
 internal override void Write(GifWriter gifWriter)
 {
     gifWriter.WriteByte(0x21);
     gifWriter.WriteByte(0xFF);
     gifWriter.WriteByte(0x0B);
     gifWriter.WriteString(applicationIdentifier.PadRight(8));
     gifWriter.WriteString(applicationAuthenticationCode.PadRight(3));
     gifWriter.WriteByte(3);
     gifWriter.WriteByte(1);
     gifWriter.WriteUInt16(loopCount);
     gifWriter.WriteByte(0);
 }
 internal override void Write(GifWriter gifWriter)
 {
     gifWriter.WriteByte(0x21);
     gifWriter.WriteByte(0xFF);
     gifWriter.WriteByte(0x0B);
     gifWriter.WriteString(applicationIdentifier.PadRight(8));
     gifWriter.WriteString(applicationAuthenticationCode.PadRight(3));
     gifWriter.WriteByte(3);
     gifWriter.WriteByte(1);
     gifWriter.WriteUInt16(loopCount);
     gifWriter.WriteByte(0);
 }
Exemplo n.º 5
0
        internal override void Write(GifWriter gifWriter)
        {
            gifWriter.WriteByte(0x21);
            gifWriter.WriteByte(0x01);
            gifWriter.WriteByte(12);

            gifWriter.WriteUInt16(left);
            gifWriter.WriteUInt16(top);
            gifWriter.WriteUInt16(width);
            gifWriter.WriteUInt16(height);

            gifWriter.WriteByte(cellWidth);
            gifWriter.WriteByte(cellHeight);

            gifWriter.WriteByte(foregroundColor);
            gifWriter.WriteByte(backgroundColor);

            gifWriter.WriteTextSubBlocks(text);

            gifWriter.WriteByte(0);
        }
        internal override void Write(GifWriter gifWriter)
        {
            gifWriter.WriteByte(0x21);
            gifWriter.WriteByte(0xF9);
            gifWriter.WriteByte(4);

            Byte flags = (byte)((transparency ? 1 : 0) | (userInputExpected ? 2 : 0) | ((int)disposalMethod << 2));

            gifWriter.WriteByte(flags);

            gifWriter.WriteUInt16(delay);
            gifWriter.WriteByte(transparencyIndex);
            gifWriter.WriteByte(0);
        }
        internal override void Write(GifWriter gifWriter)
        {
            gifWriter.WriteUInt16(width);
            gifWriter.WriteUInt16(height);

            Byte flags = (byte)(Log2(globalColorTableSize) | (globalColorTableSorted ? 0x08 : 0) | ((colorResolution - 1) << 4) | (globalColorTableFlag ? 0x80 : 0));
            gifWriter.WriteByte(flags);

            gifWriter.WriteByte(backgroundColorIndex);
            gifWriter.WriteByte(pixelAspectRatio);
        }
        internal override void Write(GifWriter gifWriter)
        {
            gifWriter.WriteByte(0x21);
            gifWriter.WriteByte(0x01);
            gifWriter.WriteByte(12);

            gifWriter.WriteUInt16(left);
            gifWriter.WriteUInt16(top);
            gifWriter.WriteUInt16(width);
            gifWriter.WriteUInt16(height);

            gifWriter.WriteByte(cellWidth);
            gifWriter.WriteByte(cellHeight);

            gifWriter.WriteByte(foregroundColor);
            gifWriter.WriteByte(backgroundColor);

            gifWriter.WriteTextSubBlocks(text);

            gifWriter.WriteByte(0);
        }
        internal override void Write(GifWriter gifWriter)
        {
            gifWriter.WriteByte(0x21);
            gifWriter.WriteByte(0xF9);
            gifWriter.WriteByte(4);

            Byte flags = (byte)((transparency ? 1 : 0) | (userInputExpected ? 2 : 0) | ((int)disposalMethod << 2));
            gifWriter.WriteByte(flags);

            gifWriter.WriteUInt16(delay);
            gifWriter.WriteByte(transparencyIndex);
            gifWriter.WriteByte(0);
        }
Exemplo n.º 10
0
        internal override void Write(GifWriter gifWriter)
        {
            gifWriter.WriteByte(0x2C);

            gifWriter.WriteUInt16(left);
            gifWriter.WriteUInt16(top);

            gifWriter.WriteUInt16(width);
            gifWriter.WriteUInt16(height);

            Byte flags = (byte)(Log2(localColorTableSize) | (localColorTableSorted ? 0x20 : 0) | (interlaced ? 0x40 : 0) | (localColorTableFlag ? 0x80 : 0));
            gifWriter.WriteByte(flags);
        }