• You could also use a 256 element precomputed lookup table I believe:

    var lut = new Uint8Array(256);
    for (var i=0;i<256,i++) lut[i] = i*0.8;
    // ... then in a loop ...
    E.mapInPlace(buffer,buffer,lut)
    
About

Avatar for Gordon @Gordon started