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

Question: Can I crop rectangular image to smaller square area #204

Closed
zinoviev opened this issue Nov 28, 2018 · 7 comments
Closed

Question: Can I crop rectangular image to smaller square area #204

zinoviev opened this issue Nov 28, 2018 · 7 comments
Labels

Comments

@zinoviev
Copy link

Hi, this is a duplicate question as ivpusic/react-native-image-crop-picker#890 As react-native-image-crop-picker uses RSKImageCropper Maybe @ruslanskorb can help me find the answer

@ruslanskorb
Copy link
Owner

Hi @zinoviev!

Is avoidEmptySpaceAroundImage property of RSKImageCropViewController what you need?

@zinoviev
Copy link
Author

zinoviev commented Nov 29, 2018

@ruslanskorb Thanks for quick response. I've tried, but I think result wasn't square sized. Where is good chance I did something wrong and if you say it's what I looking for I will try once more, maybe without RN wrapper lib for clear experiment. Is where the way to setup background color for this case?

@ruslanskorb
Copy link
Owner

@zinoviev Try avoidEmptySpaceAroundImage = NO in conjunction with applyMaskToCroppedImage = YES.

Background color of what?

@zinoviev
Copy link
Author

@ruslanskorb See sample at ivpusic/react-native-image-crop-picker#890

If we shrink original reactangular image to fit in square we need to fill remaining space with some color(or no-color) In my example it is grey. I'm wondering if we can setup this color

@ruslanskorb
Copy link
Owner

@zinoviev The remaining area is transparent and there is currently no API to fill it with color.

@ruslanskorb
Copy link
Owner

@zinoviev Have you solved the issue?

@zinoviev
Copy link
Author

@ruslanskorb Actually yes, thank you!

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

No branches or pull requests

2 participants