message: Implement pixel doubling and transparent pixel for png export
  fixes
diff: @@ -9,6 +9,34 @@ const nativeImage = require('electron').nativeImage
  let fs = require('fs')
  +function doublePixels(buf, w, h) {
  + const dstPitch = 2*w*4
  + const dst = Buffer.alloc(2*w * 2*h * 4)
  + for (let y = 0; y < h; y++) {
  + for (let x = 0; x < w; x++) {
  + const srcOffs = (x + y*w)*4
  + const dstOffs = (x*2*4 + 2*y*dstPitch)
  + const b = buf[srcOffs + 0]
  + const g = buf[srcOffs + 1]
  + const r = buf[srcOffs + 2]
  + const a = buf[srcOffs + 3]
  +
  + for (let o = 0; o < dstPitch*2; o+=dstPitch) {
  + dst[o + dstOffs + 0] = b
  + dst[o + dstOffs + 1] = g
  + dst[o + dstOffs + 2] = r
  + dst[o + dstOffs + 3] = a
  +
  + dst[o + dstOffs + 4] = b
  + dst[o + dstOffs + 5] = g
  + dst[o + dstOffs + 6] = r
  + dst[o + dstOffs + 7] = a
  + }
  + }
  + }
  + return dst
  +}
  +
  const savePNG = (filename, fb, palette, options) => {
  try {
  const { width, height, framebuf, backgroundColor } = fb
  @@ -42,7 +70,16 @@ const savePNG = (filename, fb, palette, options) => {
  }
  }
  - const img = nativeImage.createFromBuffer(buf, {width: dwidth, height: dheight})
  + const scale = options.doublePixels ? 2 : 1
  + const pixBuf = options.doublePixels ?
  + doublePixels(buf, dwidth, dheight) : buf
  + if (options.alphaPixel) {
  + // TODO is this enough to fool png->jpeg transcoders heuristics?
  + pixBuf[3] = 254
  + }
  + const img = nativeImage.createFromBuffer(pixBuf, {
  + width: scale*dwidth, height: scale*dheight
  + })
  fs.writeFileSync(filename, img.toPNG(), null)
  }
  catch(e) {
  