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

上传图片如果分辨率很大,则crop并resize的图片质量下降明显 #3

Open
wyysoft opened this issue Oct 10, 2020 · 0 comments

Comments

@wyysoft
Copy link

wyysoft commented Oct 10, 2020

插件中AVATARS_CROP_BASE_WIDTH默认是500px,如果用户上传很大分辨率的图片,并且只裁剪很小的一块图片,插件在crop前会先resize原图,然后才crop并resize图片。
这样的隐患是resize的图片分辨率降下来以后,再crop就会导致最终图片质量很低。
解决方法是,crop之前先不要resize,x/y/w/h根据比例计算。这样crop的效果更好些。

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

1 participant