Parcourir la source

fix output index in specific convert script

Jérôme BUISINE il y a 3 ans
Parent
commit
3d77b37a21
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      run/extract_specific_png.py

+ 5 - 0
run/extract_specific_png.py

@@ -24,6 +24,10 @@ def main():
     while len(expected_index) < 6:
         expected_index = "0" + expected_index
 
+    output_index = ""
+    while len(output_index) < 6:
+        output_index = "0" + output_index
+
     images_path = glob.glob(f"{p_folder}/**/**/*{expected_index}.png")
 
     for img in sorted(images_path):
@@ -31,6 +35,7 @@ def main():
         # replace expected Samples value
         img_data = img.split('-')
         img_data[-2] = "S" + p_samples
+        img_data[-1] = output_index
 
         output_path = '-'.join(img_data)