convertHeic = async (src, maxSize, dst, jpgWriter) => {
  const t0 = Date.now()
  return fs.readFile(src)
    .then(buffer => heicDecode({ buffer }))
    .then(({width, height, data}) => {
      log.debug(t0, `Decoded heic image to raw image data (${width}x${height})`)
      return jpgWriter({width, height, data: arrayBuffer2Buffer(data)}, maxSize, dst)
    })
}
@param {string} src
@param {number} maxSize
@param {string} dst
@param {TJpgWriter} jpgWriter
@returns {Promise<void>}