Improve print layout options and character packing

This commit is contained in:
ajp_anton
2026-05-31 12:32:49 +00:00
parent 47748f3897
commit 4f9eb9ec60
4 changed files with 228 additions and 65 deletions
+5
View File
@@ -633,6 +633,11 @@ def render_sources(config: BuildConfig) -> tuple[list[PrintItem], list[PrintItem
if config.crop_black_borders and config.bleed_mm > 0:
bleed_px = mm_to_px(config.bleed_mm, config.dpi)
bleed_img = character_bleed_crop(character_source, card_px, bleed_px)
corner_size = 2 * bleed_px
ImageDraw.Draw(bleed_img).rectangle(
(0, bleed_img.height - corner_size, corner_size - 1, bleed_img.height - 1),
fill=(0, 0, 0),
)
if config.gamma_enabled:
bleed_img = apply_gamma(bleed_img, config.gamma, config.black_point)
bleed_out = RENDER_DIR / "cards" / "characters" / "bleed" / f"{safe_name(card_json.stem)}.png"