what would also be nice is shared read-only Canvas, etc. available in Web Workers so image processing (specifically analysis steps) can be paralellized without copying the entire canvas (or parts of it) through message passing.
If you use Web Workers, you are going to have to use message passing. There is no other way to communicate with a Worker. There are no truly shared objects between js threads.
However, it is still possible to post binary data to a worker and back again without making a copy of it, by using Transferable Objects [1].
You simply have to provide an array of the arraybuffers to move as the second paramter to postMessage(). The caveat is that the data is no longer available to the posting thread after the postMessage call (TypedArray length will be zero).
i'm aware of transferable objects, but it really defeats the purpose of parallelizing analysis of the same thing if that thing becomes unavailable to read after transfer. it would be great to just tell a worker to read a specific bounding box from an existing canvas without having to give up the canvas entirely or copying the bounding box contents into it.
I feel like there needs to be a gamejam / instant runoff election of features for webworkers, so much opportunity is being squandered by what could be an elegant solution to many peoples' problems.