class_docstr: Class that for helping write the animated GIF file. This is based on
  code from images2gif.py (part of visvis). The version here is modified
  to allow streamed writing.
class_docstr_tok: ["Class","that","for","helping","write","the","animated","GIF","file",".","This","is","based","on","code","from","images2gif.py","(","part","of","visvis",")",".","The","version","here","is","modified","to","allow","streamed","writing","."]
docstr: Graphics Control Extension. A sort of header at the start of
  each image. Specifies duration and transparancy.
  
  Dispose
  -------
    * 0 - No disposal specified.
    * 1 - Do not dispose. The graphic is to be left in place.
    * 2 - Restore to background color. The area used by the graphic
      must be restored to the background color.
    * 3 - Restore to previous. The decoder is required to restore the
      area overwritten by the graphic with what was there prior to
      rendering the graphic.
    * 4-7 -To be defined.
docstr_tok: ["Graphics","Control","Extension",".","A","sort","of","header","at","the","start","of","each","image",".","Specifies","duration","and","transparancy",".","Dispose","--","--","--","-","*","0","-","No","disposal","specified",".","*","1","-","Do","not","dispose",".","The","graphic","is","to","be","left","in","place",".","*","2","-","Restore","to","background","color",".","The","area","used","by","the","graphic","must","be","restored","to","the","background","color",".","*","3","-","Restore","to","previous",".","The","decoder","is","required","to","restore","the","area","overwritten","by","the","graphic","with","what","was","there","prior","to","rendering","the","graphic",".","*","4-7","-To","be","defined","."]
code: def getGraphicsControlExt(self, duration=0.1, dispose=2):
      """Graphics Control Extension. A sort of header at the start of
      each image. Specifies duration and transparancy.
  
      Dispose
      -------
        * 0 - No disposal specified.
        * 1 - Do not dispose. The graphic is to be left in place.
        * 2 - Restore to background color. The area used by the graphic
          must be restored to the background color.
        * 3 - Restore to previous. The decoder is required to restore the
          area overwritten by the graphic with what was there prior to
          rendering the graphic.
        * 4-7 -To be defined.
      """
  
      bb = b"\x21\xF9\x04"
      bb += chr((dispose & 3) << 2).encode("utf-8")
      # low bit 1 == transparency,
      # 2nd bit 1 == user input , next 3 bits, the low two of which are used,
      # are dispose.
      bb += intToBin(int(duration * 100 + 0.5))  # in 100th of seconds
      bb += b"\x00"  # no transparant color
      bb += b"\x00"  # end
      return bb
  
file_path: imageio/imageio/plugins/pillowmulti.py
imports: import logging
  import numpy
  from .pillow_legacy import PillowFormat, image_as_uint, ndarray_to_pil
label_desc: Use image node_id 9 for calling the GifWriter obj's underlying member method code with example usage: obj.getGraphicsControlExt(duration, dispose) and returns: bb