Skip to content

ColorFilter.matrix doesn't work correctly (3.29.3) #169060

Closed
@crifurch

Description

@crifurch

Steps to reproduce

  1. create empty project
  2. paste sample code
  3. Apply any ColorFilter.matrix with identity to any picture, (Ios simulator 17.5)

Expected results

Image will appears as is https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Test-Logo.svg/783px-Test-Logo.svg.png?20150906031702

Actual results

Image broken on different backgrounds

Code sample

Code sample
import 'package:flutter/widgets.dart';
 const ColorFilter identity = ColorFilter.matrix(<double>[
  1, 0, 0, 0, 0,
  0, 1, 0, 0, 0,
  0, 0, 1, 0, 0,
  0, 0, 0, 1, 0,
]);
void main() {
  runApp(ColoredBox(
    color: Color(0xFF000000),
    child: ColorFiltered(
      colorFilter: identity,
      child: Image.network(
        'https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Test-Logo.svg/783px-Test-Logo.svg.png?20150906031702',
      ),
    ),
  ));
}

Screenshots or Video

Screenshots / Video demonstration

Image

Image

Image

Logs

Logs

Flutter Doctor output

Doctor output
flutter --version                                                       
Flutter 3.29.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ea121f8859 (5 weeks ago) • 2025-04-11 19:10:07 +0000
Engine • revision cf56914b32
Tools • Dart 3.7.2 • DevTools 2.42.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: timeoutIssue is closed due to author not providing the requested details in time

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions