Skip to content

HtmlImage.toByteData has surprising behavior #66299

Closed
@dnfield

Description

@dnfield

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: imagesLoading, displaying, rendering imagese: web_htmlHTML rendering backend for Webengineflutter/engine repository. See also e: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions