Closed
Description
Feature Request
Support cropping transparent images. Currently, if you crop a partially transparent image, all the transparent pixels become white.
Why it is needed
I'm upgrading my app from RN 0.59 to 0.61. The old ImageEditor bundled with RN 0.59 supported cropping transparent images.
Possible implementation
Use UIImagePNGRepresentation instead of UIImageJPEGRepresentation? Not sure about Android
Code sample
// localFilePath contains a PNG with partially transparent image. Maybe cropData can take an extra flag to use png
let cropped = await ImageEditor.cropImage(localFilePath, {usePNG: true} )
// cropped should contain a uri with the transparency preserved
Metadata
Metadata
Assignees
Labels
No labels