kanter icon indicating copy to clipboard operation
kanter copied to clipboard

Cancel nodes when changing setting

Open lukors opened this issue 3 years ago • 3 comments

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

lukors avatar Sep 20 '21 17:09 lukors

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.

lukors avatar Feb 01 '22 20:02 lukors

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

lukors avatar Feb 02 '22 19:02 lukors

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.

lukors avatar Feb 04 '22 14:02 lukors