A convenience wrapper that extracts the first File from an
HTMLInputElement change event and converts it into ImageData.
This function handles the boilerplate of accessing the file list and checking
for existence. It is ideal for use directly in an onchange event listener.
Parameters
event: Event
The change Event from an <input type="file"> element.
Returns Promise<ImageData|null>
A promise that resolves to ImageData if a file was successfully
processed, or null if no file was selected or the input was cleared.
A convenience wrapper that extracts the first File from an HTMLInputElement change event and converts it into ImageData.
This function handles the boilerplate of accessing the file list and checking for existence. It is ideal for use directly in an
onchangeevent listener.