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

Artifacts on geometric avatar #12631

Closed
1 task done
lhinderberger opened this issue Aug 28, 2020 · 3 comments · Fixed by #12745
Closed
1 task done

Artifacts on geometric avatar #12631

lhinderberger opened this issue Aug 28, 2020 · 3 comments · Fixed by #12745
Labels
Milestone

Comments

@lhinderberger
Copy link

Description

Hello everyone. I want to bring your attention to a rather minor, but optically very unpleasing bug:

When creating an account, I noticed that the avatar had bad-looking artifacts after uploading (see attached screenshots). I suspect that this is due to a scaling algorithm that performs poorly on geometric shapes like circles.

I’ve attached the original image and a screenshot for reference.

Thank you!

Screenshots

Screenshot from codeberg-test (another instance where this also occurs):
Screenshot_2020-08-28 knut

Original avatar:
polarbear-face

@6543 6543 added the type/bug label Sep 6, 2020
@6543 6543 added this to the 1.13.0 milestone Sep 6, 2020
@6543
Copy link
Member

6543 commented Sep 6, 2020

looks like it's present in v1.12.x too

@6543
Copy link
Member

6543 commented Sep 6, 2020

this issue is has to do how we resize things ...

img = resize.Resize(AvatarSize, AvatarSize, img, resize.NearestNeighbor)

Wikipedia has interesting infos: https://en.wikipedia.org/wiki/Image_scaling

I thin we just have to switch from NearestNeighbor to Lanczos3/Bilinear/Bicubic...
-> https://github.com/nfnt/resize

or switch to a better resize lib

@6543
Copy link
Member

6543 commented Sep 6, 2020

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants