Skip to content

No anti-aliasing on rotated images #30710

Closed

Description

@RBogie

Image anti-aliasing does not work as expected when a rotation transform is applied.

Steps to Reproduce

I have a widget which is defined as follows:

Transform.rotate(
  angle: rotation,
  child: Material(
    elevation: 2,
    color: Colors.white,
    child:Container(
      padding: EdgeInsets.fromLTRB(
        width / 100.0 * 5,
        height / 100.0 * 7,
        width / 100.0 * 5,
        height / 100.0 * 35,),
      child: Container(
        width: width,
        height: height,
        child: Image.file(
          imageFile,
          filterQuality: FilterQuality.medium,
          fit: BoxFit.cover,
        ),
      ),
    )
  )
)

When looking at the rendered edges of the image inside the rotated material, you see that no anti-aliasing takes place, resulting in very rough edges.
Example:
Screenshot from 2019-04-08 19-10-36

Logs

Analyzing photobooth...                                                 
No issues found! (ran in 0.9s)
[ +102 ms] [✓] Flutter (Channel stable, v1.2.1, on Linux, locale en_US.UTF-8)
[        ]     • Flutter version 1.2.1 at /home/rob/Projects/Flutter/flutter
[        ]     • Framework revision 8661d8aecd (8 weeks ago), 2019-02-14 19:19:53 -0800
[        ]     • Engine revision 3757390fa4
[        ]     • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
⣽[   +1 ms] executing: /opt/android-sdk/platform-tools/adb devices -l
[   +5 ms] Exit code 0 from: /opt/android-sdk/platform-tools/adb devices -l
[        ] List of devices attached
[   +8 ms] executing: /opt/android-sdk/platform-tools/adb devices -l
[  +38 ms] List of devices attached
[  +14 ms] executing: /opt/android-sdk/tools/bin/sdkmanager --licenses
[+1350 ms] [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[        ]     • Android SDK at /opt/android-sdk
[        ]     • Android NDK location not configured (optional; useful for native profiling support)
[        ]     • Platform android-28, build-tools 28.0.3
[        ]     • ANDROID_HOME = /opt/android-sdk
[        ]     • Java binary at: /home/rob/opt/android-studio/jre/bin/java
[        ]     • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[        ]     • All Android licenses accepted.
[        ] [!] Android Studio (version 3.0)
[        ]     • Android Studio at /opt/android-studio
[        ]     ✗ Flutter plugin not installed; this adds Flutter specific functionality.
[        ]     ✗ Dart plugin not installed; this adds Dart specific functionality.
[        ]     • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[        ] [✓] Android Studio (version 3.3)
[        ]     • Android Studio at /home/rob/opt/android-studio
[        ]     • Flutter plugin version 32.0.1
[        ]     • Dart plugin version 182.5124
[        ]     • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[        ] [!] IntelliJ IDEA Ultimate Edition (version 2018.2)
[        ]     • IntelliJ at /opt/intellij-idea-ultimate-edition
[        ]     ✗ Flutter plugin not installed; this adds Flutter specific functionality.
[        ]     • Dart plugin version 143.1247
[        ]     • For information about installing plugins, see
[        ]       https://flutter.io/intellij-setup/#installing-the-plugins
[        ] [!] Connected device
[        ]     ! No devices available
[        ] ! Doctor found issues in 3 categories.

Activity

  1. liyuqian commented on Sep 20, 2019

    @liyuqian
    Contributor
  2. added
    a: imagesLoading, displaying, rendering images
    c: renderingUI glitches reported at the engine/skia or impeller rendering level
    on Sep 20, 2019
  3. added
    engineflutter/engine related. See also e: labels.
    on Jan 14, 2020
  4. Xummer commented on Feb 28, 2020

    @Xummer

    @eseidelGoogle how is it going now? Is there something I can do to avoid it temporarily?

  5. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    and removed
    engineflutter/engine related. See also e: labels.
    on Feb 29, 2020
  6. added this to the milestone on Feb 29, 2020
  7. modified the milestones: , April 2020 on Mar 1, 2020
  8. added a commit that references this issue on Mar 20, 2020
  9. lock commented on Apr 25, 2020

    @lock

    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.

  10. locked and limited conversation to collaborators on Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: imagesLoading, displaying, rendering imagesc: renderingUI glitches reported at the engine/skia or impeller rendering levelframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions