Skip to content
Discussion options

You must be logged in to vote

As I suspected this was a quantization issue. I've opened a PR in ImageSharp SixLabors/ImageSharp#3133 which fixes it and will deploy updates soon.

Just to note, because the new code is more accurate and the max sits exactly on the resize boundary you should shrink the ellipse width/height slightly to prevent transparency due to aliasing at resize boundary.

e.g.

EllipsePolygon mask = new(
    targetRect.X + (targetRect.Width / 2),
    targetRect.Y + (targetRect.Height / 2),
    targetRect.Width * .99F,
    targetRect.Height * .99F);

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@DarkDaskin
Comment options

@JimBobSquarePants
Comment options

@DarkDaskin
Comment options

@JimBobSquarePants
Comment options

Answer selected by JimBobSquarePants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants