현재 작업 상태 저장
This commit is contained in:
parent
07cc67761e
commit
6bd91b0d5e
674 changed files with 8726 additions and 298 deletions
|
|
@ -79,17 +79,19 @@ def shape_mask(
|
|||
def erase_features(neutral: Image.Image) -> Image.Image:
|
||||
base = neutral.convert("RGBA")
|
||||
patches = [
|
||||
((286, 284, 424, 388), (418, 360, 476, 392), "round", 11),
|
||||
((476, 284, 614, 388), (418, 360, 476, 392), "round", 11),
|
||||
((404, 374, 498, 434), (392, 360, 512, 410), "ellipse", 9),
|
||||
((370, 404, 530, 476), (388, 382, 512, 428), "ellipse", 10),
|
||||
((318, 292, 410, 320), (418, 360, 476, 392), "round", 5),
|
||||
((490, 292, 582, 320), (418, 360, 476, 392), "round", 5),
|
||||
((306, 314, 412, 372), (418, 360, 476, 392), "ellipse", 5),
|
||||
((488, 314, 594, 372), (418, 360, 476, 392), "ellipse", 5),
|
||||
((412, 382, 490, 430), (392, 360, 512, 410), "ellipse", 5),
|
||||
((382, 414, 518, 466), (388, 382, 512, 428), "ellipse", 6),
|
||||
]
|
||||
|
||||
for erase_box, sample_box, kind, feather in patches:
|
||||
color = median_skin(base, sample_box)
|
||||
fill = Image.new("RGBA", CANVAS, color)
|
||||
mask = Image.new("L", CANVAS, 0)
|
||||
draw_shape(mask, erase_box, kind, 30)
|
||||
draw_shape(mask, erase_box, kind, 18)
|
||||
mask = mask.filter(ImageFilter.GaussianBlur(feather))
|
||||
base = Image.composite(fill, base, mask)
|
||||
return base
|
||||
|
|
@ -333,7 +335,7 @@ def main() -> int:
|
|||
sheet,
|
||||
"brow-neutral",
|
||||
(600, 424, 848, 482),
|
||||
(312, 288, 588, 326),
|
||||
(315, 272, 591, 310),
|
||||
matte_lo=10,
|
||||
matte_hi=42,
|
||||
)
|
||||
|
|
@ -341,7 +343,7 @@ def main() -> int:
|
|||
sheet,
|
||||
"eyes-neutral",
|
||||
(594, 458, 856, 548),
|
||||
(306, 314, 594, 376),
|
||||
(311, 314, 599, 376),
|
||||
matte_lo=10,
|
||||
matte_hi=44,
|
||||
)
|
||||
|
|
@ -370,7 +372,7 @@ def main() -> int:
|
|||
sheet,
|
||||
"mouth-sad",
|
||||
(888, 520, 1016, 586),
|
||||
(383, 414, 517, 468),
|
||||
(397, 414, 531, 468),
|
||||
matte_lo=10,
|
||||
matte_hi=44,
|
||||
)
|
||||
|
|
@ -378,7 +380,7 @@ def main() -> int:
|
|||
sheet,
|
||||
"mouth-warm",
|
||||
(888, 596, 1016, 662),
|
||||
(383, 414, 517, 468),
|
||||
(397, 414, 531, 468),
|
||||
matte_lo=10,
|
||||
matte_hi=44,
|
||||
)
|
||||
|
|
@ -386,7 +388,7 @@ def main() -> int:
|
|||
sheet,
|
||||
"mouth-open",
|
||||
(888, 672, 1016, 752),
|
||||
(380, 407, 520, 475),
|
||||
(394, 407, 534, 475),
|
||||
matte_lo=10,
|
||||
matte_hi=44,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue