Decodes a Blob (typically PNG) back into an ImageData object.
This function uses hardware-accelerated decoding via createImageBitmap
and processes the data using an OffscreenCanvas to ensure
compatibility with Web Workers.
Parameters
blob: Blob
The binary image data to decode.
Returns Promise<ImageData>
A promise resolving to the decoded ImageData.
Throws
Thrown if the blob is corrupted or the browser cannot decode the format.
Decodes a Blob (typically PNG) back into an ImageData object.
This function uses hardware-accelerated decoding via createImageBitmap and processes the data using an OffscreenCanvas to ensure compatibility with Web Workers.