[Defect] Black background added for transparent images
See original GitHub issueDescription
For allowsEditing
set to true
, every images picked from library with alpha channel will be black backgrounded:
When editing is disabled, images have white background as expected:
How to repeat issue and example
Here is my options passed to ImagePicker.showImagePicker()
as first argument:
{
allowsEditing: true,
cameraType: 'front',
maxHeight: 512,
maxWidth: 512,
mediaType: 'photo',
storageOptions: { path: 'images', skipBackup: true },
title: null,
}
Solution
No solutions proposed yet.
Additional Information
- React Native version:
react-native@0.46.4
- Platform: iOS (not tested on Android)
- Development Operating System:
macOS Sierra 10.12.5
- Dev tools: Xcode 8
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12
Top Results From Across the Web
Pasted transparent PNG files have a black background
I am experiencing an issue with all transparent png files copied from Chrome and pasted into Photoshop CS6. The background is black rather...
Read more >[Defect] Black background added for transparent images
Have you figured out this issue? I cant seem to remove the white backgrounds from png image. It was black until I removed...
Read more >How to Fix Black Transparent PNG Background in File ...
How to Remove Black Background on Transparent PNG Images in File Explorer. Method #1 – Change Your View Type. It is possible that...
Read more >Getting a Black Background on Transparent Images - Shopify ...
Solved: I have a handful of products that I have transparent backgrounds on, and on the product pages they show up with a...
Read more >How to Fix a Transparent Image That Appears With a Black ...
When a PNG image with a transparent background is selected from the Recent FIle selector and appears with a black background, the black...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I discovered the problem. When using “maxHeight” or “maxWidth”, the image is converted from PNG to JPEG, causing the transparent area to be converted to black.
Is there any way to keep the image in PNG?
Any updates on this?