Improve print layout options and character packing
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user