27 lines
587 B
Python
27 lines
587 B
Python
import os.path
|
|
from glob import glob
|
|
|
|
|
|
class ImageStandardizer:
|
|
def __init__(self, input_dir: str) -> None:
|
|
super().__init__()
|
|
|
|
# todo scan for .jpeg files
|
|
|
|
# scan input dir for files
|
|
files = glob(input_dir + '/**/*.jpg', recursive=True)
|
|
if len(files) == 0:
|
|
raise ValueError
|
|
|
|
# convert them into absolute paths
|
|
files = [os.path.abspath(x) for x in files]
|
|
|
|
# sort filenames
|
|
files.sort()
|
|
|
|
def analyze_images(self) -> None:
|
|
pass
|
|
|
|
def get_standardized_images(self) -> None:
|
|
pass
|