Moved optima file class to its own folder.
This commit is contained in:
parent
f542e857ff
commit
1285e5a844
2 changed files with 8 additions and 2 deletions
0
optima/__init__.py
Normal file
0
optima/__init__.py
Normal file
|
@ -1,6 +1,7 @@
|
|||
import re
|
||||
import os
|
||||
from datetime import datetime
|
||||
#from utils.utility import Utilities
|
||||
# My packages
|
||||
from utils.image_handler import ImageProcessor, ExifHandler
|
||||
|
||||
class OPTIMA35:
|
||||
|
@ -29,7 +30,7 @@ class OPTIMA35:
|
|||
"optimize": False,
|
||||
"gps": False
|
||||
}
|
||||
self.selected_exif = None
|
||||
self.selected_exif = {}
|
||||
|
||||
def modify_timestamp_in_exif(self, exif_data, filename):
|
||||
""""Takes exif data and adjust time to fit ending of filename."""
|
||||
|
@ -50,6 +51,7 @@ class OPTIMA35:
|
|||
def process(self, image_input_file, image_output_file):
|
||||
with self.image_processor.open_image(image_input_file) as img:
|
||||
processed_img = img
|
||||
image_name = os.path.basename(image_output_file)
|
||||
|
||||
if self.settings["resize"] != False:
|
||||
processed_img = self.image_processor.resize_image(
|
||||
|
@ -107,3 +109,7 @@ class OPTIMA35:
|
|||
ending_number = current_image
|
||||
ending = f"{ending_number:0{total_digits}}"
|
||||
return f"{base_name}_{ending}"
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Please load OPTIMA35 into the ui class...")
|
||||
exit()
|
Loading…
Add table
Add a link
Reference in a new issue