hnvn / flutter_image_cropper

A Flutter plugin for Android and iOS supports cropping images
993 stars 388 forks source link

Support for Transparent images #140

Open sur950 opened 4 years ago

sur950 commented 4 years ago

My image is transparent black logo and crop tool is adding black colour as default in background and after cropping, I see complete black screen and I would be very happy if you can add support for transparent images.

hnvn commented 4 years ago

The plugin only works as a bridge between Dart codes and native codes of the native library (framework). So, if the native library doesn't support a feature, I can do nothing to bring it to the plugin. You may as well visit the native library repositories (TOCropViewController and uCrop) and try to request this feature, after it is available on the native sides, I can update the Dart codes to make it available on the plugin.

sur950 commented 4 years ago

Thanks @hnvn for such a quick response. I have requested the support for transparent images in native libraries and will let you know once they have added it.

sur950 commented 4 years ago

HI @hnvn I just got an update from TOCropViewController and they say that they are supporting transparent images.

Screenshot 2020-02-24 at 2 30 32 PM
hnvn commented 4 years ago

What about Android?

sur950 commented 4 years ago

Regarding android, they are yet to respond and waiting for their response.

Thank you.

sur950 commented 4 years ago

@hnvn In Android, the developers of UCrop plugin say the following

May be you is not calling

UCrop.Options configInstance = new UCrop.Options(); configInstance.setCompressionFormat(Bitmap.CompressFormat.PNG) ... before start UCropActivity. You can do this building a UCrop.Options instances and pass it on

UCrop.of(from, cropTo).withOptions(configInstance)

tanlucvo commented 1 year ago

any update ?

Dionnie123 commented 1 month ago

Any update on this one? problem still occurs