 // Render and save the layer
      layer.render()
      save(layer.canvas, path)
    }

    window.onload = async () => {
      const original = genRandomNoise(16, 16)
      save(original, 'original.png')

      const samples = {
        'brightness.png': new etro.effect.Brightness({
          brightness: -100
        }),
        'contrast.png': new etro.effect.Contrast({
          contrast: 0.5
        }),
        'channels.png': new etro.effect.Channels({
          factors: {
            r: 0.25,
       