for i in range(0, len(texture.image.pixels), 4):
for j in range(3):
texdata += "\\x{:02X}".format(int(texture.image.pixels[i+j]*255))
for i in range(0, len(texture.image.pixels), 4):
for j in range(3):
texdata += "\\x{:02X}".format(int(texture.image.pixels[i+j]*255))