Skip to content

Commit

Permalink
🍱 添加角标资源与更改注释&修改默认值
Browse files Browse the repository at this point in the history
  • Loading branch information
phidiaLam committed Dec 15, 2024
1 parent 13d3f88 commit ed4bcc1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Usage: python -m avatar_embed [OPTIONS] AVATAR_PATH

Options:
-e, --embed PATH 头像文件 [required]
-e, --embed PATH 角标文件 [required]
-p, --pos [tl|tr|bl|br] 角标位置, tl: 左上, tr: 右上, bl: 左下, br: 右下
-s, --size FLOAT 角标大小, 相对于头像的比例
-o, --output TEXT 输出图片的大小, 格式:宽x高
Expand Down
4 changes: 2 additions & 2 deletions avatar_embed/embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def embed(
pos: Literal[
"top-left", "top-right","bottom-left", "bottom-right"
] = "bottom-right",
label_size: float = 0.25,
output_size: tuple[int, int] = (128, 128),
label_size: float = 0.3,
output_size: tuple[int, int] = (65, 65),
) -> Image:
"""将角标嵌入头像中的某个角落
Expand Down
Binary file added tests/assets/label2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/assets/label3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/assets/label4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ed4bcc1

Please sign in to comment.