Skip to content

[web] ResizeImage not working #73120

Closed
Closed

Description

When using ResizeImage, the resizing seems to be completed ignored on web.

General steps to Reproduce

  1. Use ResizeImage.
  2. Run using `flutter run -d chrome --web-renderer canvaskit

Expected results: images get resized down to the specified size.

Actual results: the resizing is ignored on web.

This happens on the latest Flutter version:

doctor
[✓] Flutter (Channel master, 1.26.0-2.0.pre.150, on macOS 11.1 20C69 darwin-x64,
    locale en-US)
    • Flutter version 1.26.0-2.0.pre.150
    • Framework revision 5b1aa60a46 (4 hours ago), 2020-12-29 12:06:41 -0800
    • Engine revision b304148d46
    • Dart version 2.12.0 (build 2.12.0-179.0.dev)

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 11.1 20C69 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 87.0.4280.88

Detailed steps

I have no widget example for this but use ResizeImage directly. Because the setup is a little more involved, it would be super annoying to copy-paste everything into the GitHub text field.

Instead, I have some easy steps that directly use the code from my repo:

  • Make sure you are on the master channel and that you have run flutter config --enable-web and flutter config --enable-macos (or flutter config --enable-windows on Windows).
  • git clone https://github.com/creativecreatorormaybenot/funvas.git
  • cd funvas/funvas_demo
  • git checkout 332d84045c5e03ff850f0b999921d7c6d49b88a9
  • Now, follow the step below for both flutter run -d chrome --web-renderer canvaskit --no-sound-null-safety and flutter run -d macos --no-sound-null-safety (or -d windows) to see the difference.
  • Run the app (on web and on desktop) and press the left arrow button once in that app.
Web Desktop
Screen Shot 2020-12-30 at 12 24 43 AM Screen Shot 2020-12-30 at 12 44 52 AM

As you can see on dekstop, the overlayed image is scaled down (to 245x245), however, on web, it will not be scaled down and stay the same size as the background image (420x420).

Activity

  1. TahaTesser commented on Dec 30, 2020

    @TahaTesser
    Contributor

    Hi @creativecreatorormaybenot
    Thanks for filing the issue, I can reproduce it using the steps on the web.

    flutter doctor -v
    [✓] Flutter (Channel master, 1.26.0-2.0.pre.157, on Microsoft Windows [Version 10.0.19042.685], locale en-US)
        • Flutter version 1.26.0-2.0.pre.157 at C:\Code\flutter_master
        • Framework revision 4b83be6c23 (2 hours ago), 2020-12-30 02:09:03 -0500
        • Engine revision 0e5a25d779
        • Dart version 2.12.0 (build 2.12.0-179.0.dev)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at C:\Code\sdk
        • Platform android-30, build-tools 30.0.3
        • ANDROID_HOME = C:\Code\sdk
        • Java binary at: C:\Code\android-studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
        • All Android licenses accepted.
    
    [✓] Chrome - develop for the web
        • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
    
    [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.3)
        • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
        • Visual Studio Community 2019 version 16.8.30804.86
        • Windows 10 SDK version 10.0.18362.0
    
    [✓] Android Studio (version 4.1.0)
        • Android Studio at C:\Code\android-studio
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    
    [✓] VS Code (version 1.52.1)
        • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.18.0
    
    [✓] Connected device (4 available)
        • Android SDK built for x86 64 (mobile) • emulator-5554 • android-x64    • Android 5.0.2 (API 21) (emulator)
        • Windows (desktop)                     • windows       • windows-x64    • Microsoft Windows [Version
          10.0.19042.685]
        • Chrome (web)                          • chrome        • web-javascript • Google Chrome 87.0.4280.88
        • Edge (web)                            • edge          • web-javascript • Microsoft Edge 87.0.664.66
    
    • No issues found!
    Thank you
  2. added
    a: imagesLoading, displaying, rendering images
    e: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Web
    engineflutter/engine related. See also e: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    platform-webWeb applications specifically
    c: renderingUI glitches reported at the engine/skia or impeller rendering level
    on Dec 30, 2020
  3. self-assigned this
    on Jan 7, 2021
  4. yjbanov commented on Feb 4, 2021

    @yjbanov
    Contributor
  5. removed
    assigned for triageissue is assigned to a domain expert for further triage
    on Feb 24, 2021
  6. removed their assignment
    on Feb 24, 2021
  7. added
    P1High-priority issues at the top of the work list
    on Feb 24, 2021
  8. yjbanov commented on Feb 24, 2021

    @yjbanov
    Contributor

    Unassigning for now as this is blocked on Skia API.

  9. HayesGordon commented on Feb 21, 2022

    @HayesGordon

    Hi 👋 , any update on this? I see that the Skia issue status is now marked as done?

  10. mboyamike commented on May 2, 2022

    @mboyamike

    Also asking, any update on this? Just faced it

  11. ozz-rjq commented on May 17, 2022

    @ozz-rjq

    having the same issue

  12. harryterkelsen commented on Sep 26, 2022

    @harryterkelsen
    Contributor

    This issue is fixed now

  13. github-actions commented on Oct 10, 2022

    @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.

  14. locked as resolved and limited conversation to collaborators on Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work lista: imagesLoading, displaying, rendering imagesc: renderingUI glitches reported at the engine/skia or impeller rendering leveldependency: skiaSkia team may need to help use: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 1.26Found to occur in 1.26has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specifically

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions