Fast image filters for Browsers with WebGL support
Introduces a number of blending modes: normal, add, multiply, screen, overlay, darken, lighten, exclusion and color-burn. Example usage: ```javascript // Creating overlay canvas const cv = document.createElement('canvas'); cv.width = img.width; cv.height = img.height; const ctx = cv.getContext('2d'); // Creating cyan -> yellow radial gradient on the canvas const gradient = ctx.createRadialGradient( cv.width/2, cv.height/2, 0, cv.width/2, cv.height/2, Math.hypot(cv.width, cv.height)/2 ); gradient.addColorStop(0, 'cyan'); gradient.addColorStop(1, 'yellow'); ctx.fillStyle = gradient; ctx.fillRect(0, 0, cv.width, cv.height); // Applying the gradient canvas as an overlay on an image const glFilter = new WebGLImageFilter({canvas}); glFilter.addFilter('blend', cv, 'overlay', 0.5); glFilter.apply(img); ``` result: <img src="https://i.imgur.com/ykulPKK.jpg">
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by sdegueldre and has received 1 comments.