Skip to content

Commit

Permalink
🔨 feat(utils): update create_mask_from_sketch function
Browse files Browse the repository at this point in the history
- Add min_block_size parameter to control the size of pixel blocks
- Set jagged_edges parameter to False by default
- Update function documentation with parameter explanations
  • Loading branch information
sudoskys committed Feb 13, 2024
1 parent 6e0ca63 commit fa67acc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion playground/mask/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
with open('ori.png', 'rb') as f:
ori_bytes = f.read()

return_bytes = create_mask_from_sketch(original_img_bytes=ori_bytes, sketch_img_bytes=sk_bytes, jagged_edges=True)
return_bytes = create_mask_from_sketch(original_img_bytes=ori_bytes,
sketch_img_bytes=sk_bytes,
jagged_edges=True,
min_block_size=15
)

with open('mask_export.png', 'wb') as f:
f.write(return_bytes)

0 comments on commit fa67acc

Please sign in to comment.