INNER CODE UNIT · Python

inset_size

utopia-rise/godot-jvm · logo/export.py:149

    inset_size = MASTER_SIZE - 64
    inset = master.resize((inset_size, inset_size), Image.Resampling.LANCZOS)
    padded = Image.new('RGBA', master.size)
    padded.alpha_composite(inset, (32, 32))
    outline = Image.new('RGBA', padded.size, '#EAF6FF')
    outline.putalpha(padded.getchannel('A').filter(ImageFilter.MaxFilter(25)))
    outline.alpha_composite(padded)
    outline.resize((1024, 1024), Image.Resampling.LANCZOS).save(HIGHRES / 'logo-1024-outline.png')

    for name, _ in LANGUAGES:
        inkscape_export(inkscape, LANGUAGE / f'{name}.svg', LANGUAGE / f'{name}.png', LANGUAGE_PNG_SIZE)
    print(f'Rendered highres/ logo SVGs {SVG_SIZES}, PNGs {PNG_SIZES} and the outlined 1024, and language/ PNGs')


# ------------------------------------------------------------------ 2. store images

def text_layer(text, fnt, fill, tracking=0.0):
    """Render text with letter tracking (fraction of font size) into a tightly cropped layer."""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…