Function constructImageBitmapSource

conveniently construct an ImageBitmapSource from different image source types.

if you use a raw buffer (number[] | Uint8Array | Uint8ClampedArray | ArrayBuffer) as the image source, then you are expected to provide the width of the image.