You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We spend a lot of compute time encoding images as datauri in order to pass them from one module to the next. It may also be possible to use blobs and save encoding time, although we would definitely want to compare the benchmark tests to see if this is true.
I think this is probably worth it! I think it's possible. We had very very long ago considered different formats for between-module data handoff, including possibly buffers...? i forget, but it was in our very first issue: #1 (comment)
the default is data-urls, because strings are completely compatible, but if two modules can negotiate that both are compatible with blobs, that's OK too. I think originally the data-urls worked especially well because they had to be displayed anyways. But now that I think of it I think it's possible to display a blob as well in the browser.
We spend a lot of compute time encoding images as datauri in order to pass them from one module to the next. It may also be possible to use blobs and save encoding time, although we would definitely want to compare the benchmark tests to see if this is true.
(moving this from this comment thread)
I think this is probably worth it! I think it's possible. We had very very long ago considered different formats for between-module data handoff, including possibly buffers...? i forget, but it was in our very first issue: #1 (comment)
the default is data-urls, because strings are completely compatible, but if two modules can negotiate that both are compatible with blobs, that's OK too. I think originally the data-urls worked especially well because they had to be displayed anyways. But now that I think of it I think it's possible to display a blob as well in the browser.
Also note https://stackoverflow.com/questions/7650587/using-javascript-to-display-a-blob
I wonder if this would just work, but it depends on the run environment, I imagine:
image-sequencer/src/Run.js
Lines 18 to 54 in 5298d1e
We could add a parameter to drawStep somewhere that evaluates whether the neighboring steps can both handle blobs.
Interestingly i think we may already be doing this in some modules, where interacting with the
glfx
library:image-sequencer/src/modules/ColorHalftone/Module.js
Lines 35 to 36 in 3caa033
See this section:
image-sequencer/src/modules/ColorHalftone/Module.js
Lines 71 to 82 in 3caa033
there, we are trying to treat a blob URL just like a url by using
blobUrl = window.URL.createObjectURL(blob);
!!The text was updated successfully, but these errors were encountered: