Allow blending two images together
This commit is contained in:
5
src/processing/merge.ts
Normal file
5
src/processing/merge.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export function mergeImages(pixels: Uint8ClampedArray, destination: Uint8ClampedArray) {
|
||||
for (let i = 0; i < destination.length; i += 1) {
|
||||
destination[i] = pixels[i] * 0.5 + destination[i] * 0.5;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user