Add the ability to disable saving preview images. Also rename --gamma_correct to --gamma-correct for consistency

This commit is contained in:
kris 2021-11-24 15:41:32 +00:00
parent 8175dcb052
commit 8d3ab4f50e
1 changed files with 12 additions and 6 deletions

View File

@ -323,13 +323,17 @@ def main():
'--verbose', action=argparse.BooleanOptionalAction,
default=False, help="Show progress during conversion")
parser.add_argument(
'--gamma_correct', type=float, default=2.4,
'--gamma-correct', type=float, default=2.4,
help='Gamma-correct image by this value (default: 2.4)'
)
parser.add_argument(
'--fixed_colours', type=int, default=0,
'--fixed-colours', type=int, default=0,
help='How many colours to fix as identical across all 16 SHR palettes'
)
parser.add_argument(
'--save-preview', type=bool, default=True,
help='Whether to save a .PNG rendering of the output image'
)
args = parser.parse_args()
if args.lookahead < 1:
parser.error('--lookahead must be at least 1')
@ -424,6 +428,8 @@ def main():
print("%d unique colours" % unique_colours)
seq += 1
if args.save_preview:
# Save Double hi-res image
outfile = os.path.join(
os.path.splitext(args.output)[0] + "-%d-preview.png" % seq)