Repository navigation
Description
Steps to reproduce
Deploy the provided minimal code sample to an iPhone 16 Plus or iPhone 17 Pro Max.
Open the native iOS Camera app and take a new live photo.
Open the iOS Photos app, select the new photo, and edit it using the native iOS "Markup" tool (draw on the image). Save the changes.
Open the Flutter app and tap the button to trigger ImagePicker().pickImage().
Select the marked-up photo from the gallery.
Our team tested it on iPhone 16 plus (OS version 26.2), iPhone 17 Pro Max (OS version 26.4), and iPhone 13 (OS version 26.3). The issue is only reproducible on iPhone 17 and 16.
Expected results
The image_picker plugin should successfully process the image and return a Uint8List representing the final, edited image (including the drawn markup).
Actual results
On the iPhone 16 Plus (OS 26.2) and iPhone 17 Pro Max (OS 26.4), the image_picker fails to process the image correctly. XFile is returned correctly but its an empty file.
However, when performing these exact same steps on an iPhone 13 (OS 26.3), the image is picked successfully with the markup edits intact.
Code sample
Code sample
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.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(colorScheme: .fromSeed(seedColor: Colors.deepPurple)),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
Uint8List? _bytes;
Future<void> pickFile() async {
final picker = ImagePicker();
final file = await picker.pickImage(
source: ImageSource.gallery,
maxHeight: 1920,
maxWidth: 1920,
imageQuality: 80,
requestFullMetadata: false,
);
if (file != null) {
final fileBytes = await file.readAsBytes();
setState(() {
_bytes = fileBytes;
});
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: Text(widget.title)),
body: Center(
child: Column(mainAxisAlignment: .center, children: [if (_bytes != null) Image.memory(_bytes!)]),
),
floatingActionButton: FloatingActionButton(
onPressed: pickFile,
tooltip: 'Pick File',
child: const Icon(Icons.add),
),
);
}
}
Screenshots or Video
Logs
Logs
CGBitmapContextCreate: unsupported parameter combination:
RGB | 10 bits/component, integer | 5760 bytes/row.
kCGImageAlphaNoneSkipLast | kCGImageByteOrder16Little | kCGImagePixelFormatPacked
Set CGBITMAP_CONTEXT_LOG_ERRORS environmental variable to see more details.Flutter Doctor output
Doctor output
❯ flutter doctor -v
[✓] Flutter (Channel stable, 3.41.7, on macOS 26.3.1 25D771280a darwin-arm64, locale en-GB) [404ms]
• Flutter version 3.41.7 on channel stable at /Users/artur/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision cc0734ac71 (11 days ago), 2026-04-15 21:21:08 -0700
• Engine revision 59aa584fdf
• Dart version 3.11.5
• DevTools version 2.54.2
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file,
enable-lldb-debugging, enable-uiscene-migration
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,679ms]
• Android SDK at /Users/artur/Library/Android/sdk
• Emulator version 36.4.9.0 (build_id 14788078) (CL:N/A)
• Platform android-36, build-tools 36.1.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.9+-14649483-b1163.86)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 26.4.1) [1,201ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17E202
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [6ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (5 available) [6.5s]
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 16 (API 36) (emulator)
• Artur’s iPhone (mobile) • 00008150-001150D23C63401C • ios • iOS 26.4 23E246
• Artur’s iPhone (wireless) (mobile) • 00008110-00046CA6012A801E • ios • iOS 26.3.1 23D771330a
• macOS (desktop) • macos • darwin-arm64 • macOS 26.3.1 25D771280a darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 147.0.7727.116
! Error: Browsing on the local area network for Artur’s iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources [496ms]
• All expected network resources are available.
• No issues found!
Activity
mbcorona commentedon Apr 27, 2026
Hi @artur-sitemanagerpro
Thanks for the report. I tested this on a physical iPhone 15 Pro Max and on an iPhone 17 Simulator, and in both cases the picker successfully returned the marked-up image. Since it works on the iPhone 17 Simulator but fails on your physical iPhone 17, this strongly suggests a hardware-specific encoding issue.
Routing to team-ios with an FYI to the ecosystem team so this can be investigated directly on physical iPhone 16/17 hardware.
hellohuanlin commentedon Apr 30, 2026
Worth trying it out with a native app using UIImagePicker API directly.
hellohuanlin commentedon Apr 30, 2026
@mbcorona from triage: could you try out some native apps (e.g. iMessages) and see if it reproduces? Thanks
jmillian commentedon Jun 2, 2026
We are running into the same issue on iphone 17 Pro Max on iOS 26.5.
Any markup applied to an image on the iPhone, if you upload from that device, will show this error. If the image is sent off the native device where the markup originated, the image will work and upload.
Any markup options, shapes, pen, pencil and marker all cause the error for the image.
Note:
If you remove
The image will then succeed. It appears the issue is isolated to the image_picker compression, based on our investigation.
BrumelisMartins commentedon Jun 18, 2026
We are also able to reproduce the same issue as @jmillian described
[image_picker] Fix scaling 10-bit images (flutter#12557)
github-actions commentedon Oct 7, 2026
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 -vand a minimal reproduction of the issue.