Skip to content

Optimal approach to chain multiple transformations and persist output stream at each stage. #66

Answered by saucecontrol
ryanmar asked this question in Q&A
Discussion options

You must be logged in to vote

I received another request for this offline and worked up a quick example showing how to save the output of one operation into a memory cache so it can be encoded to an output file and then re-used as a source for a further resize: https://gist.github.com/saucecontrol/b648ec3c711d9787b45001b7b41fafdd

Again, this isn't necessarily a performance win and will definitely use more memory, but if the decode is expensive, the technique could be of benefit.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by saucecontrol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #55 on March 01, 2021 22:25.