protected void writeGraphicCtrlExt() throws IOException {
  out.write(0x21);
  out.write(0xf9);
  out.write(4);
  int transp, disp;
  if (transparent == null) {
    transp=0;
    disp=0;
  }
 else {
    transp=1;
    disp=2;
  }
  if (dispose >= 0) {
    disp=dispose & 7;
  }
  disp<<=2;
  out.write(0 | disp | 0| transp);
  writeShort(delay);
  out.write(transIndex);
  out.write(0);
}

protected void writeGraphicCtrlExt ( ) throws IOException { out . write ( 0x21 ) ; out . write ( 0xf9 ) ; out . write ( 4 ) ; int transp , disp ; if ( transparent == null ) { transp = 0 ; disp = 0 ; } else { transp = 1 ; disp = 2 ; } if ( dispose >= 0 ) { disp = dispose & 7 ; } disp <<= 2 ; out . write ( 0 | disp | 0 | transp ) ; writeShort ( delay ) ; out . write ( transIndex ) ; out . write ( 0 ) ; }
writes graphic control extension
