Skip to content

[camera] Add support for RGBA_8888 image streaming format#11632

Open
Mairramer wants to merge 4 commits intoflutter:mainfrom
Mairramer:feature/add-rgba8888-format
Open

[camera] Add support for RGBA_8888 image streaming format#11632
Mairramer wants to merge 4 commits intoflutter:mainfrom
Mairramer:feature/add-rgba8888-format

Conversation

@Mairramer
Copy link
Copy Markdown
Contributor

This PR adds support for the rgba8888 image format group for both Android (camera_android_camerax) and iOS (camera_avfoundation).

Closes flutter/flutter#151193

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@Mairramer
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for the rgba8888 image format across the camera plugin ecosystem, covering the platform interface, Android (CameraX), and iOS (AVFoundation) implementations. The changes include necessary enum additions, mapping logic, Pigeon-generated code updates, and unit tests. Review feedback identifies missing mappings for the Android PixelFormat.RGBA_8888 constant (value 1) in the main package and platform interface. Furthermore, updates to dependency versions in several pubspec.yaml files are required to ensure cross-package compatibility for the new format.

Comment thread packages/camera/camera/lib/src/camera_image.dart Outdated
Comment thread packages/camera/camera_avfoundation/pubspec.yaml
Comment thread packages/camera/camera/pubspec.yaml
@Mairramer
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for the rgba8888 image format across the camera plugin and its federated implementations for Android (CameraX) and iOS (AVFoundation). The changes include updating the platform interface, adding format mappings in the native implementations, and bumping package versions. Feedback was provided regarding a potential mismatch in Android format codes where PixelFormat.RGBA_8888 (1) should be supported alongside ImageFormat.FLEX_RGBA_8888 (42) for consistency, and a minor documentation fix was suggested for a constant name.

Comment thread packages/camera/camera/lib/src/camera_image.dart Outdated
Comment thread packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart Outdated
@Mairramer Mairramer changed the title WIP - [camera] Add support for RGBA_8888 image streaming format [camera] Add support for RGBA_8888 image streaming format May 1, 2026
@Mairramer Mairramer marked this pull request as ready for review May 1, 2026 19:31
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for the rgba8888 image format across the camera plugin ecosystem, including the platform interface, Android (CameraX), and iOS (AVFoundation) implementations. The changes include updating the ImageFormatGroup enum, implementing format mapping logic in Dart and native code, and adding corresponding unit tests. Additionally, Pigeon-generated files were updated to a newer version, and temporary dependency overrides were included for testing. I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[camera_android_camerax] Support RGBA_8888 image format group

1 participant