create_texture__nether_dust.py 464 B

1234567891011121314151617181920212223242526
  1. import png
  2. s = [
  3. [
  4. '1',
  5. ],
  6. [
  7. '11',
  8. ],
  9. [
  10. '111',
  11. '111',
  12. ],
  13. ]
  14. # R, G, B, Alpha (0xFF = opaque):
  15. palette=[(0x00,0x00,0x00,0x00), (0x8F,0x69,0x66,0x9F)]
  16. #palette=[(0x00,0x00,0x00,0x00), (0xF0,0xF0,0xF0,0x80)]
  17. for i in range(0, len(s)):
  18. print(str(i)+"/"+str(len(s)))
  19. q = [[int(c) for c in row] for row in s[i]]
  20. w = png.Writer(len(q[0]), len(q), palette=palette, bitdepth=1)
  21. f = open('mcl_particles_nether_dust'+str(i+1)+'.png', 'wb')
  22. w.write(f, q)