-
Notifications
You must be signed in to change notification settings - Fork 217
Description
The idea in image-sequencer is that each module is self contained, but I am thinking about how to avoid re-encoding images over and over:
I was thinking of making a way for each module to see what the outputs of the previous module are, maybe ranked by preference/least work, and to choose a format that'd take the least work.
Say, if module A can output an ndarray and subsequent module B can consume an ndarray, A would (via module.getNdarray()?) choose to send it that way instead of as an Image object, to avoid encoding/decoding.
However, each module would have to have the module.getImage() method, at a minimum, so we can render its output as a step in the interface, or in case it's the final module.
An adapter method could do the matching and necessary conversions?