Open opheliagame opened 1 year ago
I am trying to crop a transparent image and save it as a jpeg file with no transparency.
My settings look like this
CroppedFile? croppedImage = await ImageCropper().cropImage( sourcePath: imageFile.path, compressFormat: ImageCompressFormat.jpg, compressQuality: 100, uiSettings: [ AndroidUiSettings( toolbarTitle: 'Cropper', toolbarColor: Colors.deepOrange, toolbarWidgetColor: Colors.white, initAspectRatio: CropAspectRatioPreset.original, lockAspectRatio: false), IOSUiSettings( title: 'Cropper', ), WebUiSettings( context: context, presentStyle: CropperPresentStyle.dialog, boundary: CroppieBoundary( width: 300, height: 250, ), viewPort: const CroppieViewPort(width: 250, height: 250, type: 'circle'), enableExif: true, enableZoom: true, showZoomer: true, ], );
So my understanding is that when cropping a png file with transparency the croppedImage should be a jpeg but I am getting back a png. I have checked the mimetype of the returned Uint8List with the mimetype package
croppedImage
Uint8List
Is there something I am doing wrong?
I am trying to crop a transparent image and save it as a jpeg file with no transparency.
My settings look like this
So my understanding is that when cropping a png file with transparency the
croppedImage
should be a jpeg but I am getting back a png. I have checked the mimetype of the returnedUint8List
with the mimetype packageIs there something I am doing wrong?