static async read(input) {
        if (input instanceof RawImage) {
            return input;
        } else if (typeof input === 'string' || input instanceof URL) {
            return await this.fromURL(input);
        } else if (input instanceof Blob) {
            return await this.fromBlob(input);
        } else if (
            (typeof HTMLCanvasElement !== "undefined" && input instanceof HTMLCanvasElement)
            ||
            (typeof OffscreenCanvas !== "undefined" && input instanceof OffscreenCanvas)
        ) {
            return this.fromCanvas(input);
        } else {
            throw new Error(`Unsupported input type: ${typeof input}`);
        }
    }
Helper method for reading an image from a variety of input types.
@param {RawImage|string|URL|Blob|HTMLCanvasElement|OffscreenCanvas} input
@returns The image object.

**Example:** Read image from a URL.
```javascript
let image = await RawImage.read('https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/football-match.jpg');
// RawImage {
//   "data": Uint8ClampedArray [ 25, 25, 25, 19, 19, 19, ... ],
//   "width": 800,
//   "height": 533,
//   "channels": 3
// }
```