diff --git a/2bit.py b/2bit.py index 1e5e08f..0ca02f5 100644 --- a/2bit.py +++ b/2bit.py @@ -37,7 +37,7 @@ for x in range(image.width): for y in range(image.height): i += 1 bar.index = i - if i % 200 == 0: bar.update() + if i % 193 == 0: bar.update() # I used to use 200 but then the last two digits of the current status were always "00" which made it look like the progress bar was fake pos = (x,y) color = image.getpixel(pos) if len(color) == 4: @@ -54,4 +54,5 @@ for x in range(image.width): color[z] = colors[index] out.putpixel(pos, tuple(color)) out.save(outfile) +bar.update() # Otherwise it will display the last multiple of 193 out of the total value bar.finish() diff --git a/test/run.py b/test/run.py index de57387..9bf9b8e 100644 --- a/test/run.py +++ b/test/run.py @@ -12,6 +12,7 @@ max_i = len(files) * (16*3) def getparams(i): percolor = dither = False + i %= 48 if i % 16 >= 8: percolor = True if i >= 16: @@ -44,3 +45,4 @@ for f in files: print("On " + outfilename) subprocess.call(["python3", "../2bit.py", f, outfilename, bits_formatted, *percolor, *dither]) i += 1 +print("Done")