1

I made a BlobUrl from a Canvas element on my main / DOM thread like this:

 canvas.toBlob(function(blob) {
      photo.src = URL.createObjectURL(blob);
    }, 'image/jpeg', 1);

I send the BlobUrl to my WebWorker. How can I read the byte array in my WebWorker using just BlobUrl? (I am trying to avoid unnecesary copies)

1 Answer 1

1

To avoid copies, use transferrables.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.