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

How can I change the background color of the cropped image to transparent? #308

Closed
chuongvuoop2021 opened this issue Oct 29, 2021 · 5 comments

Comments

@chuongvuoop2021
Copy link

chuongvuoop2021 commented Oct 29, 2021

Describe the issue:
Right now when I try to crop an image with transparent background, it would automatically change that background color to black, is there anyway I can change this?
To Reproduce
download an image with transparent background then use crop tool to crop it, the background will turn black.
pngwing com

image
Expected behavior
the cropped image's background should have the same color with the original one

@ValentinH
Copy link
Owner

ValentinH commented Oct 31, 2021

You should set the exported image to be a png in the crop image.js file. See #165 (comment)

@chuongvuoop2021
Copy link
Author

You should set the exported image to be a png in the crop image.js file. See #165 (comment)

that worked, thank you very much!

@ianWins2n
Copy link

You should set the exported image to be a png in the crop image.js file. See https://github.com/ricardo-ch/react-easy-crop/issues/165#issuecomment-711417984

im having the same issue, this link is not working anymore

@ValentinH
Copy link
Owner

Here it is: #165 (comment)

@ianWins2n

@ianWins2n
Copy link

Here it is: #165 (comment)

@ianWins2n

thanks

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

No branches or pull requests

3 participants