Closed
Description
It seems like we should be throwing an exception instead of returning null at https://github.com/flutter/engine/blob/e3444d895545b629370fcf0ddd43f84b361ed306/lib/web_ui/lib/src/engine/html_image_codec.dart#L137
We also ignore the format parameter. It's not really clear to me right now what format we actually return, but I suspect it's the original encoded format of the image rather than the format the caller is requesting. The caller can request raw RGBA array or request PNG data, or "rawUnmodified," which should probably be the same as rawRgba on web.