This repository has been archived on 2023-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
MineClone2/tools/create_texture__mcl_particl...

22 lines
365 B
Python

import png
s = [
'0000010',
'0101100',
'0010111',
'0101010',
'1010111',
'0001100',
'0010100',
]
s = [[int(c) for c in row] for row in s]
# R, G, B, Alpha (0xFF = opaque):
palette=[(0x00,0x00,0x00,0x00), (0xcf,0x00,0xcf,0xe0)]
w = png.Writer(len(s[0]), len(s), palette=palette, bitdepth=1)
f = open('mcl_particles_nether_portal.png', 'wb')
w.write(f, s)