Skip to content

Webp repetitionCount is misinterpreted (can't use a non-looping webp) #45246

@luke14free

Description

@luke14free

Steps to Reproduce

  1. Create a webp image with loop count equal to 1 (which in chrome correctly shows just one loop, i.e. it doesn't repeat).
  2. Use this image inside a Image.asset(...)
  3. The image will do two loops in my flutter-based app due to
    if (_codec.repetitionCount == -1 || completedCycles <= _codec.repetitionCount) {
    in which completedCycles <= _codec.repetitionCount instead of completedCycles < _codec.repetitionCount, which instead would work and be consistent with the Chrome implementation

Target Platform: iOS
Target OS version/browser: Catalina 10.15.1
Devices: Simulator 12.0

$ flutter doctor -v
[✓] Flutter (Channel unknown, v1.10.8-pre.4, on Mac OS X 10.15.1 19B88, locale it-IT)
    • Flutter version 1.10.8-pre.4 at /Users/luca/development/flutter
    • Framework revision abc50db9d1 (8 weeks ago), 2019-09-24 13:46:10 +0200
    • Engine revision 9e6314d348
    • Dart version 2.6.0 (build 2.6.0-dev.0.0 1103600280)

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
      You may also want to add it to your PATH environment variable.


[✓] Xcode - develop for iOS and macOS (Xcode 11.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.2, Build version 11B52
    • CocoaPods version 1.8.4

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[✗] Cannot determine if IntelliJ is installed
    ✗ Directory listing failed

[✓] Connected device (2 available)
    • iPhone 11 Pro Max • 6128890D-C193-4923-BF9F-597F124B50C0 • ios        • com.apple.CoreSimulator.SimRuntime.iOS-13-2 (simulator)
    • macOS             • macOS                                • darwin-x64 • Mac OS X 10.15.1 19B88

! Doctor found issues in 3 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: imagesLoading, displaying, rendering imagesc: renderingUI glitches reported at the engine/skia or impeller rendering levelplatform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions