Skip to content

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

Closed

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!

Activity

  1. added
    e: impellerImpeller rendering backend issues and features requests
    P1High-priority issues at the top of the work list
    on Apr 10, 2025
  2. changed the title [-]dart:ui Image ignores ICC color profiles when using Impeller Vulkan[/-] [+]dart:ui Image ignores ICC color profiles when using Impeller[/+] on Apr 11, 2025
  3. maheshj01 commented on Apr 11, 2025

    @maheshj01
    Member

    Reproducible on stable and the master channel

    With/Without Impeller (IOS) Impeller Enabled (Android) Impeller DIsabled (Android)
    Image Image Image

    Original Image

    code sample
    import 'package:flutter/material.dart';
    
    void main() {
      runApp(const MyApp());
    }
    
    class MyApp extends StatelessWidget {
      const MyApp({super.key});
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
            title: 'Flutter Demo',
            theme: ThemeData(
              primarySwatch: Colors.blue,
            ),
            home: Material(
              child: Center(
                  child: Image.network("https://www.color.org/Lower_Left.jpg")),
            ));
      }
    }
    
  4. added
    engineflutter/engine related. See also e: labels.
    c: renderingUI glitches reported at the engine/skia or impeller rendering level
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    and removed
    in triagePresently being triaged by the triage team
    on Apr 11, 2025
  5. added
    r: fixedIssue is closed as already fixed in a newer version
    on Apr 11, 2025
  6. github-actions commented on Apr 25, 2025

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

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

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