diff --git a/imagetools.py b/imagetools.py new file mode 100644 index 0000000..73d1514 --- /dev/null +++ b/imagetools.py @@ -0,0 +1,11 @@ +import PIL + +def load_and_keep_aspect_rescale(path, target_x, target_y): + '''Load an image and resize it while keeping the aspect ratio (crop if it doesnt fit)''' + + img = PIL.Image.open(path) + # get size + # img.size() + + img = img.resize((x-2*30, y-2*30)) + img = PIL.ImageTk.PhotoImage(img) \ No newline at end of file diff --git a/localconfig.py b/localconfig.py deleted file mode 100644 index 277a91d..0000000 --- a/localconfig.py +++ /dev/null @@ -1,15 +0,0 @@ -class LocalConfig: - - def __init__(self): - - self.remote_user = None - self.remote_pass = None - self.skip_registry_ask = None - - def save_to_fs(self): - '''Save the current config to the local file system''' - pass - - def load_from_fs(self): - '''Load a config file from the filesystem''' - pass \ No newline at end of file