Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Maintain transparency in PNG images when picking & cropping #1925

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GunnarAK
Copy link

@GunnarAK GunnarAK commented May 23, 2023

Hi all,

Please feel free to suggest/make changes as I am not certain this PR is production ready.

Let's make this feature request a thing of the past!!

I'm using the following configuration:

const response = await ImageCropPicker.openPicker({
  mediaType: 'photo',
  cropping: true,
  enableRotationGesture: false,
  freeStyleCropEnabled: false,
  cropperActiveWidgetColor: theme.colors.accent,
  cropperChooseColor: '#007AFF', // iOS only
  cropperCancelColor: theme.colors.white, // iOS only
  height: 200,
  width: 200,
  compressImageQuality: 0.8,
  showCropFrame: isAndroid,
});

With this config I am able to:

  • select a PNG image and maintain its transparency
  • select a PNG Image, crop it, and maintain its transparency
  • select a JPEG image, optionally crop it (just like before)

Related tickets:

Other tickets that will benefit from these changes (still need some work):

@GunnarAK GunnarAK marked this pull request as ready for review May 23, 2023 20:05
@GunnarAK GunnarAK changed the title [Android] Maintain all PNG properties when picking & cropping PNG [Android] Maintain transparency in PNG images when picking & cropping May 23, 2023
@amazingSheeppp
Copy link

Thank you! That helped me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants