Skip to content

dart:ui Image ignores ICC color profiles when using Impeller #166954

@weiziqian

Description

@weiziqian

Steps to reproduce

When displaying images with ICC profile, Skia works fine but when using Impeller Vulkan on Android, it does not take the ICC profiles into account. Resulting de-saturated or wrong color images.
For example this image:

Image.network("https://www.color.org/Lower_Left.jpg")

it should be blue sky but with Impeller you will see green sky.

Because nowadays a lot phone camera shoots photo with a wider color gamut like DCI-P3 and AdobeRGB, without supporting icc profile those images displayed in flutter looks very de-saturated.

Expected results

Image displayed with blue sky yellow mountain

Actual results

Image displayed with green sky pink mountain

Code sample

Image.network("https://www.color.org/Lower_Left.jpg")

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.27.1, on Ubuntu 20.04.6 LTS 6.2.16-060216-generic, locale C.UTF-8)
    • Flutter version 3.27.1 on channel stable at /home/aylwin/flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd882 (4 months ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.40.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /home/aylwin/Android/Sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /home/aylwin/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.29.6
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2024.2)
    • Android Studio at /home/aylwin/android-studio
    • Flutter plugin version 83.0.3
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)

[✓] VS Code (version 1.91.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.108.0

[✓] Connected device (3 available)
    • 23116PN5BC (mobile) • 89bb73e1 • android-arm64  • Android 14 (API 34)
    • Linux (desktop)     • linux    • linux-x64      • Ubuntu 20.04.6 LTS 6.2.16-060216-generic
    • Chrome (web)        • chrome   • web-javascript • Google Chrome 113.0.5672.63

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: renderingUI glitches reported at the engine/skia or impeller rendering levele: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.found in release: 3.29Found to occur in 3.29found in release: 3.31Found to occur in 3.31has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions