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

AvatarWithRoundedCorner not transparent #10

Closed
thhet opened this issue Jul 24, 2019 · 3 comments
Closed

AvatarWithRoundedCorner not transparent #10

thhet opened this issue Jul 24, 2019 · 3 comments

Comments

@thhet
Copy link

thhet commented Jul 24, 2019

It seems, that the rounded corner sample is not working well with photo images. The cut out corners are not transparent for a lot of images. Cliparts are usually ok, but real world images tend to produce black corners.

sprinkles

fb-round

@JimBobSquarePants
Copy link
Member

I’m assuming from the output these images are jpegs?

If so, that’s expected as jpegs do not contain an alpha channel.

@thhet
Copy link
Author

thhet commented Jul 26, 2019

Input image is a png. But your comment has led me to a solution: When I serialize the selected image into a memory stream using a PngEncoder with ColorType = PngColorType.RgbWithAlpha, load the image from this stream and than apply rounded corners everything works as expected.

Thanks for your reply!

@thhet thhet closed this as completed Jul 26, 2019
@JimBobSquarePants
Copy link
Member

Excellent! Glad you worked it out 👍

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

2 participants