jayphelps / jayphelps/stackblur
Duplicate alpha unmultiplication
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 6
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The version posted on quasimondo.com has a bug that has already been fixed elsewhere. Specifically, the RGB values are multiplied by inverse alpha in lines 213-219, and again in lines 322-328. This produces strange artifacts in translucent areas. The unmultiplication should only be applied on the second pass, so the first pass can be simplified for a little extra speed boost.
I submitted this fix to Mario Klingemann recently, and he informed me that it had already been fixed in EaselJS, but not yet back-ported to his own version. The one in EaselJS has some other nice features too, like independent `blurX` and `blurY` parameters for anisotropic blur, and a `quality` parameter to control the iterations of stack depth. Check it out:
https://github.com/CreateJS/EaselJS/blob/master/src/easeljs/filters/BlurFilter.js
I'm looking for a stand-alone version of this without the EaselJS dependency. If I can't find one, I guess I'll do it myself.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the standalone implementation's first-pass logic at lines 213-219 with the second pass at lines 322-328, then review the linked EaselJS BlurFilter.js implementation. Done means removing the duplicate unmultiplication from the first pass while preserving the second-pass behavior and standalone use without the EaselJS dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100