mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 00:19:32 +01:00
Texture converter: refactor convert_alphatex
This commit is contained in:
parent
e2daac4c33
commit
1319271fd4
1 changed files with 4 additions and 4 deletions
|
@ -115,10 +115,10 @@ tex_dir = base_dir + "/assets/minecraft/textures"
|
|||
|
||||
# FUNCTION DEFINITIONS
|
||||
|
||||
def convert_alphatex(one, two, three, four, five):
|
||||
os.system("convert "+one+" -crop 1x1+"+three+" -depth 8 -resize "+four+"x"+four+" "+tempfile1.name)
|
||||
os.system("composite -compose Multiply "+tempfile1.name+" "+two+" "+tempfile2.name)
|
||||
os.system("composite -compose Dst_In "+two+" "+tempfile1.name+" -alpha Set "+five)
|
||||
def convert_alphatex(colormap, source, colormap_pixel, texture_size, destination):
|
||||
os.system("convert "+colormap+" -crop 1x1+"+colormap_pixel+" -depth 8 -resize "+texture_size+"x"+texture_size+" "+tempfile1.name)
|
||||
os.system("composite -compose Multiply "+tempfile1.name+" "+source+" "+tempfile2.name)
|
||||
os.system("composite -compose Dst_In "+source+" "+tempfile1.name+" -alpha Set "+destination)
|
||||
|
||||
def target_dir(directory):
|
||||
if make_texture_pack:
|
||||
|
|
Loading…
Reference in a new issue