Open harshkhandeparkar opened 4 years ago
@jywarren @publiclab/is-reviewers
Thanks!!!
For this:
New way to access earlier steps' pixels.
I long ago had an issue which I can't find, which had the idea that if two neighboring steps BOTH agreed, they could pass a different image format, and skip the data-url encoding/decoding step. But both would have to agree on the format, like ndarray
, and we'd probably have to clearly and very thoroughly document and test the possible formats to agree upon before allowing this kind of inter-step negotiation. Maybe the same kind of thing could be used for nested modules?
Please describe the problem (or idea)
Code similar to the following was used earlier for EdgeDetect and was used in one of the PRs https://github.com/publiclab/image-sequencer/blob/ef75475238c937994e7184aa0c58c59bbb80d355/src/modules/Mask/Module.js#L33-L39
What happens:
The following code uses the Blur module inside the edge-detect module https://github.com/publiclab/image-sequencer/blob/ecaa3ecd131a794ecf7c5d799542e437d992f25d/src/modules/EdgeDetect/Module.js#L1 https://github.com/publiclab/image-sequencer/blob/ecaa3ecd131a794ecf7c5d799542e437d992f25d/src/modules/EdgeDetect/Module.js#L31-L33
What happens:
The first approach is not optimized and has a lot of overhead and unnecessary conversion. The second approach is the best possible approach.
BUT the first approach cannot be used in every scenario. Because:
Blur
function.PixelManipulation
and should be passed as a parameter toextraManipulation
. This is the reason why some modules do not work with GIFs (the old steps' pixels are difficult to access frame by frame).It would be helpful if someone creates two separate issues out of this.
Blur
)Thank you!
Your help makes Public Lab better! We deeply appreciate your helping refine and improve this site.
To learn how to write really great issues, which increases the chances they'll be resolved, see:
https://publiclab.org/wiki/developers#Contributing+for+non-coders