code: function makegif(im, gif, style) {
    // tag ; widthxheight ; GCT:0:0:7 ; bgcolor + aspect // GCT
    // Image Separator // left x top // widthxheight // Flags
    // LZW code size
    let r = style === -1 ? random(0, colors.length) : style
    gif.fill(colors[r].replace(/\n/g, ''), 0, 13 + 48 + 10 + 1, 'ascii')
  
    let i = 0
    let p = 13 + 48 + 10 + 1
    for (let y = 0; y < 70; y++) {
      gif[p++] = 250 // Data length 5*50=250
      for (let x = 0; x < 50; x++) {
        let a = im[i + 0] >> 4
        let b = im[i + 1] >> 4
        let c = im[i + 2] >> 4
        let d = im[i + 3] >> 4
  
        gif[p + 0] = 16 | (a << 5) // bbb10000
        gif[p + 1] = (a >> 3) | 64 | (b << 7) // b10000xb
        gif[p + 2] = b >> 1 // 0000xbbb
        gif[p + 3] = 1 | (c << 1) // 00xbbbb1
        gif[p + 4] = 4 | (d << 3) // xbbbb100
        i += 4
        p += 5
      }
    }
  
    gif.fill('\x01\x11\x00;', GIF_SIZE - 4)
  }
docs: http://brokestream.com/captcha.html