viewer: add sign images

This commit is contained in:
Matthias Schiffer 2024-01-06 22:59:37 +01:00
parent dca9c394f2
commit 7834315dd3
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
90 changed files with 97 additions and 0 deletions

90
resource/sign_textures.py Executable file
View file

@ -0,0 +1,90 @@
#!/usr/bin/env python3
import shutil
import sys
from PIL import Image
MATERIALS = [
'acacia',
'bamboo',
'birch',
'cherry',
'crimson',
'dark_oak',
'jungle',
'mangrove',
'oak',
'spruce',
'warped',
]
in_dir = sys.argv[1]
out_dir = sys.argv[2]
def sign_bg_image(material):
in_path = f'{in_dir}/assets/minecraft/textures/entity/signs/{material}.png'
out_path = f'{out_dir}/bg/{material}_sign.png'
out_path_wall = f'{out_dir}/bg/{material}_wall_sign.png'
in_image = Image.open(in_path)
out_image = Image.new('RGBA', (24, 26))
out_image.paste(in_image.crop((2, 2, 26, 14)), (0, 0))
out_image.paste(in_image.crop((2, 16, 4, 30)), (11, 12))
out_image.save(out_path)
out_image = Image.new('RGBA', (24, 12))
out_image.paste(in_image.crop((2, 2, 26, 14)), (0, 0))
out_image.save(out_path_wall)
def hanging_sign_bg_image(material):
in_path = f'{in_dir}/assets/minecraft/textures/gui/hanging_signs/{material}.png'
out_path = f'{out_dir}/bg/{material}_hanging_sign.png'
out_path_wall = f'{out_dir}/bg/{material}_hanging_wall_sign.png'
in_image = Image.open(in_path)
out_image = Image.new('RGBA', (16, 14))
out_image.paste(in_image.crop((0, 2, 16, 16)), (0, 0))
out_image.save(out_path)
shutil.copyfile(in_path, out_path_wall)
def sign_icon_image(material):
in_path = f'{in_dir}/assets/minecraft/textures/item/{material}_sign.png'
out_path = f'{out_dir}/icon/{material}_sign.png'
out_path_wall = f'{out_dir}/icon/{material}_wall_sign.png'
in_image = Image.open(in_path)
out_image = Image.new('RGBA', (13, 14))
out_image.paste(in_image.crop((2, 2, 15, 16)), (0, 0))
out_image.save(out_path)
out_image = Image.new('RGBA', (13, 9))
out_image.paste(in_image.crop((2, 2, 15, 11)), (0, 0))
out_image.save(out_path_wall)
def hanging_sign_icon_image(material):
in_path = f'{in_dir}/assets/minecraft/textures/item/{material}_hanging_sign.png'
out_path = f'{out_dir}/icon/{material}_hanging_sign.png'
out_path_wall = f'{out_dir}/icon/{material}_hanging_wall_sign.png'
in_image = Image.open(in_path)
out_image = Image.new('RGBA', (14, 12))
out_image.paste(in_image.crop((1, 3, 15, 15)), (0, 0))
out_image.save(out_path)
out_image = Image.new('RGBA', (14, 14))
out_image.paste(in_image.crop((1, 1, 15, 15)), (0, 0))
out_image.save(out_path_wall)
for material in MATERIALS:
sign_bg_image(material)
hanging_sign_bg_image(material)
sign_icon_image(material)
hanging_sign_icon_image(material)

7
viewer/images/README.md Normal file
View file

@ -0,0 +1,7 @@
# README
The images in this directory are assets directly taken from Minecraft, or are derived from Minecraft
assets. They are copyrighted by Mojang/Microsoft, and are used in accordance with the
[Minecraft Usage Guidelines](https://www.minecraft.net/en-us/usage-guidelines).

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B