Comments (4)
@yjbanov attached archive has vanilla webgl example with the same image rendered just fine.
from flutter.
Consider filing an issue in Chromium bug tracker. Flutter Web uses ImageDecoder
API to decode images.
from flutter.
Thanks for the report. I was able to replicate this on latest stable and master version only with canvaskit. With html renderer, it shows the image properly and also on desktop platform. I tried to verify if this is a regression by running the code on 3.19.6, but it was stuck at:
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome... 15.8s
So I am not sure if this has regressed in latest version or not.
stable, master flutter doctor -v
[!] Flutter (Channel stable, 3.22.2, on macOS 12.2.1 21D62 darwin-x64, locale
en-GB)
• Flutter version 3.22.2 on channel stable at
/Users/dhs/documents/fluttersdk/flutter
! Warning: `flutter` on your path resolves to
/Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
your current Flutter SDK checkout at
/Users/dhs/documents/fluttersdk/flutter. Consider adding
/Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
! Warning: `dart` on your path resolves to
/Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 761747bfc5 (33 hours ago), 2024-06-05 22:15:13 +0200
• Engine revision edd8546116
• Dart version 3.4.3
• DevTools version 2.34.3
• If those were intentional, you can disregard the above warnings; however
it is recommended to use "git" directly to perform update checks and
upgrades.
[!] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
! Flutter recommends a minimum Xcode version of 13.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] VS Code (version 1.62.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.21.0
[✓] Connected device (5 available)
• SM G975F (mobile) • RZ8M802WY0X • android-arm64 • Android 11 (API 30)
• Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 •
ios • iOS 14.4.1 18D61
• iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729 •
ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
• macOS (desktop) • macos •
darwin-x64 • Mac OS X 10.15.4 19E2269 darwin-x64
• Chrome (web) • chrome •
web-javascript • Google Chrome 98.0.4758.80
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
[!] Flutter (Channel master, 3.23.0-13.0.pre.212, on macOS 12.2.1 21D62
darwin-x64, locale en-GB)
• Flutter version 3.23.0-13.0.pre.212 on channel master at
/Users/dhs/documents/fluttersdk/flutter
! Warning: `flutter` on your path resolves to
/Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
your current Flutter SDK checkout at
/Users/dhs/documents/fluttersdk/flutter. Consider adding
/Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
! Warning: `dart` on your path resolves to
/Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 7b6d667701 (7 hours ago), 2024-06-12 19:34:52 -0400
• Engine revision c7fcbfce60
• Dart version 3.5.0 (build 3.5.0-250.0.dev)
• DevTools version 2.36.0
• If those were intentional, you can disregard the above warnings; however
it is recommended to use "git" directly to perform update checks and
upgrades.
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/dhs/Library/Android/sdk
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for
more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 13C100
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 65.1.4
• Dart plugin version 213.7228
[✓] VS Code (version 1.62.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.29.0
[✓] Connected device (3 available)
• Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
• iOS 15.3.1 19D52
• macOS (desktop) • macos •
darwin-x64 • macOS 12.2.1 21D62 darwin-x64
• Chrome (web) • chrome •
web-javascript • Google Chrome 109.0.5414.119
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
[!] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
! Flutter recommends a minimum Xcode version of 13.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] VS Code (version 1.62.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.21.0
[✓] Connected device (5 available)
• SM G975F (mobile) • RZ8M802WY0X • android-arm64 • Android 11 (API 30)
• Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 •
ios • iOS 14.4.1 18D61
• iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729 •
ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
• macOS (desktop) • macos •
darwin-x64 • Mac OS X 10.15.4 19E2269 darwin-x64
• Chrome (web) • chrome •
web-javascript • Google Chrome 98.0.4758.80
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
/cc @yjbanov
from flutter.
@darshankawar, thanks for the quick response.
The image renders correctly if we remove EXIF beforehand.
For instance, using the function below.
import 'package:image/image.dart' as img;
Future<Uint8List> stripExif(Uint8List originalBytes) async {
var image = img.decodeJpg(originalBytes);
image = img.bakeOrientation(image!);
final bytesWithExif = img.encodeJpg(image);
const int app1 = 0xFFE1; // segment of EXIF data
final strippedImage = <int>[];
int i = 0;
int end;
while (i < bytesWithExif.length) {
// segment length is encoded on bytes 2 and 3 of the segment
int segmentLength = (bytesWithExif[i + 2] << 8) + bytesWithExif[i + 3];
if (bytesWithExif[i] == 0xFF && bytesWithExif[i + 1] == app1) {
// Skip APP1 segment
i += 2 + segmentLength;
} else {
// Add segment to new image
end = min(i + 2 + segmentLength, bytesWithExif.length);
strippedImage.addAll(bytesWithExif.sublist(i, end));
i += 2 + segmentLength;
}
}
return Uint8List.fromList(strippedImage);
}
from flutter.
Related Issues (20)
- Impeller opt-outs via manifest files are no longer reported to GA4 HOT 4
- [pigeon] Make the codec public HOT 1
- Not displaying the full title when using a gradient for the app bar HOT 2
- Exceptions from Services library on backspace keypresses HOT 3
- [web] Remove virtual keyboard timer hack on iOS Safari
- toStringAsFixed and Number format does not work correctly HOT 1
- [web] Implement `AppLifecycleState.detached` properly HOT 1
- TextPainter getFullHeightForCaret returns confusing values with nested TextSpans HOT 4
- "run suite safari-dart2js-html-ui" test failed: `[Webdriver][Error] Unable to start the server: Operation not permitted`
- Xcode compilation is slow on macOS 14 bots HOT 23
- iOS embedder always creates overlay layer, even when its empty. HOT 4
- WidgetsBindingObserver doesn't report gaining / losing focus on GNOME when changing workspace views HOT 2
- [camera_android_camerax] `ResolutionPreset.max` gets different camera aspect ratio compare to `camera_android` HOT 2
- [camera_android_camerax] `setZoomLevel` is slow or throttled compare to `camera_android` HOT 1
- [tool_crash] SocketException: Send failed, OS Error: No route to host, errno = 65 HOT 1
- AndroidView touch event issue HOT 2
- [tool_crash] Flutter crashes when filesystem doesn't support symbolic links HOT 2
- HarmonyOS next HOT 2
- android_deferred_components_setup_files generates invalid build.gradle HOT 3
- Blur doesn't apply properly when a platform view gets rounded HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter.