code: function writeGraphicCtrlExt() {
      out.writeByte(0x21); // extension introducer
      out.writeByte(0xf9); // GCE label
      out.writeByte(4); // data block size
      var transp;
      var disp;
      if (transparent === null) {
        transp = 0;
        disp = 0; // dispose = no action
      } else {
        transp = 1;
        disp = 2; // force clear if using transparent color
      }
      if (dispose >= 0) {
        disp = dispose & 7; // user override
      }
      disp <<= 2;
      // packed fields
      out.writeByte(0 | // 1:3 reserved
        disp | // 4:6 disposal
        0 | // 7 user input - 0 = none
        transp); // 8 transparency flag
  
      WriteShort(delay); // delay x 1/100 sec
      out.writeByte(transIndex); // transparent color index
      out.writeByte(0); // block terminator
    }
docs: Writes Graphic Control Extension