title: Issue combining PNGs to GIF in Node.js
body: <p>I am trying to combine a sequence of PNGs to create a GIF. However, I am getting two issues:</p>
  <ol>
  <li><p>The GIFs rendered have some colors missing (usually white and light colors) that get replaced by black (see images below)</p>
  </li>
  <li><p>Sometimes the outputted file doesn't even read, showing up with the broken image icon when I try to view it in a browser</p>
  </li>
  </ol>
  <p><strong>CODE</strong></p>
  <pre><code>const fs = require(&quot;fs&quot;);
  const os = require('os');
  const GIFEncoder = require('gifencoder');
  const pngFileStream = require('png-file-stream');
  
  const stream = pngFileStream(os.tmpdir() + '/frame_?.png')
    .pipe(encoder.createWriteStream({ repeat: 0, delay: 500, quality: 30 }))
    .pipe(fs.createWriteStream(os.tmpdir() + '/myanimated.gif'));
  </code></pre>
  <p><strong>EXAMPLE</strong></p>
  <ol>
  <li>Output GIF</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/xJplJ.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xJplJ.gif" alt="enter image description here" /></a></p>
  <ol start="2">
  <li>Inputed Images (PNG)</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/LqpX6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LqpX6.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/9vF74.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9vF74.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/UImkJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UImkJ.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/unQ59.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/unQ59.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/EaNRq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EaNRq.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/211xv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/211xv.png" alt="enter image description here" /></a></p>