kanter
kanter copied to clipboard
Cancel nodes when changing setting
The core lib does not cancel processing when a node gets dirty. Instead, it finishes processing and then processes it again once completed.
You can force-cancel the processing of a node. Canceling should be done when a setting has been "committed" to. In the current prototype interface, that's anytime a setting changes. When there are sliders, for instance, it should cancel only when the slider is released.
- [ ] Allow canceling during automatic node resizing
- [x] Cancel when disconnecting nodes
- [ ] Cancel when any setting is changed
Looks like there's no simple way to hook into the resizing algorithm to be able to cancel it. I really only need nearest neighbor and linear filtering anyway, so I might as well implement those myself and allow for cancelling there.
Instead of implementing the resizing algorithms myself, I think it's a better idea to fork image
and add the ability to cancel the resizing functions.
Less work, higher quality code.
https://github.com/image-rs/image/blob/master/src/imageops/sample.rs
Looking closer at the image
repo‥ it's huge.
It wouldn't feel good to include all of that in our reop. Maybe the best thing would be to implement the parts we need from scratch instead, as originally considered.