refactor:简化头像计算,新增头像最大尺寸参数,避免头像裁剪出来太大 || refactor: Simplify the avatar calculation and add a new avatar. Maximum size parameter to prevent the avatar from being cropped too large by hxg2050 · Pull Request #199 · msgbyte/tailchat · GitHub
Skip to content

refactor:简化头像计算,新增头像最大尺寸参数,避免头像裁剪出来太大 || refactor: Simplify the avatar calculation and add a new avatar. Maximum size parameter to prevent the avatar from being cropped too large#199

Open
hxg2050 wants to merge 7 commits intomsgbyte:masterfrom
hxg2050:master

Conversation

@hxg2050
Copy link
Copy Markdown

@hxg2050 hxg2050 commented Jan 11, 2024

使用的时候遇到提示文件太大,但是手机上的照片动辄10m+,优化了一下裁剪头像,现在选择本地图片可以选择更大的图片了


When using it, I encountered a prompt that the file is too large, but the photos on the mobile phone are often 10m+. I have optimized the cropped avatar. Now you can choose a larger image when selecting a local image.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 11, 2024

@github-actions github-actions Bot changed the title refactor:简化头像计算,新增头像最大尺寸参数,避免头像裁剪出来太大 refactor:简化头像计算,新增头像最大尺寸参数,避免头像裁剪出来太大 || refactor: Simplify the avatar calculation and add a new avatar. Maximum size parameter to prevent the avatar from being cropped too large Jan 11, 2024
0,
size,
size
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is design for common image cropper not only for avatar. for example: group background.

maybe you can check component in client/web/src/components/ImageUploader.tsx#AvatarUploader

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, understanding

@moonrailgun
Copy link
Copy Markdown
Contributor

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

Successfully merging this pull request may close these issues.

2 participants