INNER CODE UNIT · Python

edge

McDevon/taxman-engine · Scripts/generate_sprite_sheet.py:122

    edge = math.ceil(math.sqrt(full_size))
    print(f'full size {full_size} edge {edge}')
    output_image = Image.new(
        mode=('LA' if use_alpha else 'L'), size=(edge, edge))
    output_pixels = output_image.load()
    image_start = 0
    for file in files:
        orig_width, orig_height, values, alphas = image_data(
            os.path.join(directory, file)
        )
        offset_x = data[file]['offset_x']
        offset_y = data[file]['offset_y']
        size_width = data[file]['width']
        size_height = data[file]['height']
        image_index = 0
        right_edge = offset_x + size_width
        bottom_edge = offset_y + size_height
        for y in range(offset_y, bottom_edge):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…