diff --git a/TextureCreator/lib/TGAWriter.py b/TextureCreator/lib/TGAWriter.py index 8efae4e..4ca7e4e 100644 --- a/TextureCreator/lib/TGAWriter.py +++ b/TextureCreator/lib/TGAWriter.py @@ -15,7 +15,7 @@ def writeTGA(width, height, bitsPerColor, bitsPerPixel, data, path): header = struct.pack(FORMAT, 0, # Offset 0, # ColorType - 3, # ImageType + 2, # ImageType 0, # PaletteStart 0, # PaletteLen bitsPerColor, # PalBits diff --git a/TextureCreator/lib/TexturePainter.py b/TextureCreator/lib/TexturePainter.py index 3b50634..c3cc09c 100644 --- a/TextureCreator/lib/TexturePainter.py +++ b/TextureCreator/lib/TexturePainter.py @@ -191,15 +191,14 @@ class TexturePainter: arr = bytearray(buf) - del arr[0::4] - del arr[0::3] - if not self.debugGrid: - arr[0::2] = itertools.repeat(255, self.gridConfig.imageSize[0] * self.gridConfig.imageSize[1]) + arr[0::4] = itertools.repeat(255, self.gridConfig.imageSize[0] * self.gridConfig.imageSize[1]) + arr[1::4] = itertools.repeat(255, self.gridConfig.imageSize[0] * self.gridConfig.imageSize[1]) + arr[2::4] = itertools.repeat(255, self.gridConfig.imageSize[0] * self.gridConfig.imageSize[1]) targetPath = os.path.join(OUTPUT_DIR, self.outputName + ".tga") - TGAWriter.writeTGA(self.gridConfig.imageSize[0], self.gridConfig.imageSize[1], 8, 16, arr, targetPath) + TGAWriter.writeTGA(self.gridConfig.imageSize[0], self.gridConfig.imageSize[1], 8, 32, arr, targetPath) def init(self, args): imageSizeX = int(math.floor(args[2] * args[0]))