flutter_image_cropper icon indicating copy to clipboard operation
flutter_image_cropper copied to clipboard

Support for Transparent images

Open sur950 opened this issue 5 years ago • 8 comments

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.

sur950 avatar Feb 13 '20 10:02 sur950

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.

hnvn avatar Feb 14 '20 03:02 hnvn

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 avatar Feb 14 '20 04:02 sur950

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

sur950 avatar Feb 24 '20 09:02 sur950

What about Android?

hnvn avatar Feb 26 '20 07:02 hnvn

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

Thank you.

sur950 avatar Feb 26 '20 08:02 sur950

@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)

sur950 avatar Apr 15 '20 09:04 sur950

any update ?

tanlucvo avatar Apr 24 '23 04:04 tanlucvo

Any update on this one? problem still occurs

Dionnie123 avatar Jul 31 '24 02:07 Dionnie123