INNER CODE UNIT · Python

bottom

TheAssemblyArmada/Vanilla-Conquer · scripts/tgautil.py:53

                    bottom = image.height - y
                    found_bottom = True
        for x in range(0, image.width):
            if found_left and found_right:
                break
            for y in range(top, bottom):
                if found_left and found_right:
                    break
                if not found_left and alpha.getpixel((x, y)) != 0:
                    left = x
                    found_left = True
                if not found_right and alpha.getpixel((image.width - x - 1, y)) != 0:
                    right = image.width - x
                    found_right = True
        tga_data = StringIO.StringIO()
        meta = None
        if left == 0 and top == 0 and right == image.width and bottom == image.height:
            image.save(tga_data, 'TGA')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…