diff --git a/README.md b/README.md index dcdfd94..bf2e5c4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Friendly Watermarking Software with GUI option. # Watermarkd User Manual -You can find a couple of simple examples below. You are also welcome to visit this tutorial on holypython.com: [How to Use Watermarkd: A Batch Watermarking Library with GUI](https://holypython.com/watermarkd) +You can find a couple of simple examples below. You are also welcome to visit this tutorial on holypython.com: [How to Use Watermarkd: A Batch Watermarking Library with GUI](https://holypython.com/watermarkd/) # Installation @@ -52,7 +52,7 @@ import Watermarkd as wmd wmd.Spread.single(gui=True) ``` -[![Watermarkd_Single_GUI](https://raw.githubusercontent.com/holypython/Watermarkd/master/Watermarkd_Single_GUI.webp)] +![Watermarkd_Single_GUI](https://raw.githubusercontent.com/holypython/Watermarkd/master/Watermarkd_Single_GUI.webp) ### Working Without GUI @@ -74,7 +74,7 @@ import Watermarkd as wmd wmd.Spread.batch(folder_path=r"c://Users/ABC/Desktop/New_Photos") ``` -[![Watermarkd_Single_GUI](https://raw.githubusercontent.com/holypython/Watermarkd/master/Watermarkd_Batch_GUI.webp)] +![Watermarkd_Single_GUI](https://raw.githubusercontent.com/holypython/Watermarkd/master/Watermarkd_Batch_GUI.webp) * Files will be saved to Desktop/watermarkd_/ folder by default. @@ -172,6 +172,8 @@ It's expected to be dominantly used by: | 0.7.1.0 | September 29, 2020 - New Version w/ batch GUI: __init__.py fixed, bugs fixed | | 0.7.1.1 | September 29, 2020 - New Version: code typo fixed | | 0.7.1.2 | September 29, 2020 - New Version: logo fixed, source code correct description added | +| 0.7.2.0 | October 5, 2020 - New Version: GUI Exit behavior improved | +| 0.7.2.1 | October 5, 2020 - New Version: Correct Version Name | ## Release Notes @@ -183,6 +185,11 @@ It's expected to be dominantly used by: 0.7.1.0 - Added Batch GUI, fixed Cancel button, fixed path conflicts +0.7.2.0 - When GUI is closed without picking any image or folder, instead of giving an error, function is terminated by returning None. This should allow repeat operations in a single session and make usage more convenient and smooth for users. + +0.7.2.1 - Version name fixed + + ### Upcoming Work ~Batch Graphic User Interface (done)~ diff --git a/Watermarkd/Watermarkd.py b/Watermarkd/Watermarkd.py index 9a610e0..c0176ef 100644 --- a/Watermarkd/Watermarkd.py +++ b/Watermarkd/Watermarkd.py @@ -65,10 +65,12 @@ def gui1(): break elif event=="Preview": - - img_path=values["-IN2-"] - img = Image.open(img_path).convert("RGBA") - img.show() + try: + img_path=values["-IN2-"] + img = Image.open(img_path).convert("RGBA") + img.show() + except Exception: + pass elif event == "Submit": img_path=values["-IN2-"] @@ -189,8 +191,10 @@ def single(img_path="", gui=False, wm_text="Watermarkd", font_name="arial.ttf", if gui==False: pass elif gui==True: - img_path, wm_text, wm_trans, font_size, save_to_path, output_filename = Spread.gui1() - + try: + img_path, wm_text, wm_trans, font_size, save_to_path, output_filename = Spread.gui1() + except Exception: + return None #Creating Image Layers img = Image.open(img_path).convert("RGBA") @@ -233,8 +237,11 @@ def batch(gui=False, folder_path="", wm_text="Watermarkd", font_name="arial.ttf" if gui==False: pass elif gui==True: - folder_path, wm_text, wm_trans, font_size, save_to_path, filename, save_to_suffix = Spread.gui2() - + try: + folder_path, wm_text, wm_trans, font_size, save_to_path, filename, save_to_suffix = Spread.gui2() + except: + return None + file=os.scandir(folder_path) try: diff --git a/Watermarkd_Batch_GUI.webp b/Watermarkd_Batch_GUI.webp new file mode 100644 index 0000000..7cad97b Binary files /dev/null and b/Watermarkd_Batch_GUI.webp differ diff --git a/Watermarkd_Single_GUI.webp b/Watermarkd_Single_GUI.webp new file mode 100644 index 0000000..dcd2a22 Binary files /dev/null and b/Watermarkd_Single_GUI.webp differ diff --git a/setup.py b/setup.py index 9c91b27..c0eb18d 100644 --- a/setup.py +++ b/setup.py @@ -14,14 +14,14 @@ setup( name='Watermarkd', - version='0.7.1.2', + version='0.7.2.1', description='A friendly watermarking tool with optional GUI component.', license="Apache-2.0", long_description=long_description, author='holypython.com', author_email='watermarkd@holypython.com', url="https://holypython.com/", - download_url = 'https://github.com/holypython/Watermarkd/archive/0.7.1.2.tar.gz', + download_url = 'https://github.com/holypython/Watermarkd/archive/0.7.2.1.tar.gz', packages=['Watermarkd'], keywords = ['watermarking', 'image processing', 'watermark', 'photography', 'copyrights', 'holypython', 'batch watermark', 'holypython.com'], classifiers=[