Skip to content

[canvaskit] Determine if image is animated by reading its header and use Skia to decode in that case #151911

Closed
flutter-team-archive/engine
#54483

Description

@harryterkelsen

Use case

Once flutter-team-archive/engine#53201 lands, the CanvasKit backend will use <img> tags to decode images in many cases. However, we cannot use <img> to decode animated images and get single frames out, so we must use Skia to decode those images. However, we don't actually determine if the images are animated before defaulting to Skia decoding, we conservatively assume all GIF and WebP images are animated.

Proposal

Determine if the image is actually animated by reading the headers and determining that way. Only use Skia to decode if the image is actually animated, otherwise use <img>.

Activity

  1. added
    in triagePresently being triaged by the triage team
    c: new featureNothing broken; request for a new capability
    engineflutter/engine related. See also e: labels.
    platform-webWeb applications specifically
    a: imagesLoading, displaying, rendering images
    c: proposalA detailed proposal for a change to Flutter
    e: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Web
    team-webOwned by Web platform team
    and removed
    in triagePresently being triaged by the triage team
    on Jul 18, 2024
  2. added
    P1High-priority issues at the top of the work list
    triaged-webTriaged by Web platform team
    on Aug 1, 2024
  3. github-actions commented on Aug 28, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1High-priority issues at the top of the work lista: imagesLoading, displaying, rendering imagesc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Fluttere: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.platform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-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