From 9ceedcd0b30ddca23208f7b17827e09d4dff9381 Mon Sep 17 00:00:00 2001 From: Abyssal Studios <69280445+Luca06Luwa@users.noreply.github.com> Date: Fri, 3 Mar 2023 09:23:21 +1100 Subject: [PATCH 1/7] added initial support for jfif to png --- main.py | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 65a4fa0..b11235c 100644 --- a/main.py +++ b/main.py @@ -31,7 +31,6 @@ def openweb(): # start of jpg to png - def jpg_to_png(): global im1 @@ -48,11 +47,29 @@ def jpg_to_png(): else: # error messagebox.showerror("Error", "Input all Data") - # end of jpg to png -# start of png to jpg +# start of jfif to png + +def jfif_to_png(): + global im1 + + import_filename = fd.askopenfilename(filetypes=[("JFIF File", '.jfif')]) + if import_filename.endswith(".jfif"): + + im1 = Image.open(import_filename) + + # where to save + export_filename = fd.asksaveasfilename(defaultextension=".png") + im1.save(export_filename) + + messagebox.showinfo("success ", "your Image converted to Png") + else: + # error + messagebox.showerror("Error", "Input all Data") +# end of jfif to png +# start of png to jpg def png_to_jpg(): global im1 @@ -74,7 +91,6 @@ def png_to_jpg(): # start of jpg to pdf - def Jpg_to_Pdf(): global im1 import_filename = fd.askopenfilename(filetypes=[("JPG File", '.jpg')]) @@ -90,6 +106,7 @@ def Jpg_to_Pdf(): messagebox.showerror("Error", "Input all Data") # end of jpg to pdf +# start of png to pdf def png_to_pdf(): global im1 @@ -104,8 +121,10 @@ def png_to_pdf(): messagebox.showinfo("success ", "your Image converted to pdf ") else: messagebox.showerror("Error", "Input all Data") +# end of png to pdf - +#start of png to ico + def png_to_ico(): global im1 import_filename = fd.askopenfilename(filetypes=[("PNG File", '.png')]) @@ -118,7 +137,9 @@ def png_to_ico(): messagebox.showinfo("success ", "your Image converted to ico ") else: messagebox.showerror("Error", "Input all Data") +#end of png to ico +#start of jpg to ico def jpg_to_ico(): global im1 @@ -132,6 +153,7 @@ def jpg_to_ico(): messagebox.showinfo("success ", "your Image converted to ico ") else: messagebox.showerror("Error", "Input all Data") +#end of jgg to ico # start of buttons From ef371f62f68b90faf459a22b03e7308faa892d9f Mon Sep 17 00:00:00 2001 From: Abyssal Studios <69280445+Luca06Luwa@users.noreply.github.com> Date: Tue, 7 Mar 2023 09:32:01 +1100 Subject: [PATCH 2/7] specify unstable version until stable release --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index b11235c..88e15e7 100644 --- a/main.py +++ b/main.py @@ -9,7 +9,7 @@ root = Tk() # Application Information -root.title("Image Converter 1.8") # name of window +root.title("Image Converter (Test Builds)") # name of window root.resizable(False, False) # Cant resize window frame1 = Frame(heigh=250, width=300, bg='teal') # bg1 From 01533c6efb9f696e17edf65b0ecc0ad9906d8a49 Mon Sep 17 00:00:00 2001 From: Abyssal Studios <69280445+Luca06Luwa@users.noreply.github.com> Date: Tue, 7 Mar 2023 09:42:44 +1100 Subject: [PATCH 3/7] added button --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 88e15e7..87c6c64 100644 --- a/main.py +++ b/main.py @@ -188,6 +188,11 @@ def jpg_to_ico(): button7.place(x=160, y=120) +button8 = Button(root, text="Jfif -> Png", width=9, height=1, bg="purple", + fg="white", font=("helvetica", 12, "bold"), command=jfif_to_png, relief=GROOVE) + +button8.place(x=160, y=160) + # end of button # website button and placement and geometry of window From c58fc7a5a3b0f6bf837a6375a861d23a6146134f Mon Sep 17 00:00:00 2001 From: Abyssal Studios <69280445+Luca06Luwa@users.noreply.github.com> Date: Fri, 10 Mar 2023 11:09:01 +1100 Subject: [PATCH 4/7] Added MIT License into code. --- main.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/main.py b/main.py index 87c6c64..30d9511 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,27 @@ +#****************************************************************************# +# This file is part of Py Image Converter. * +# Copyright (c) 2022-2023 NotsoFrostyy * +# * +# Permission is hereby granted, free of charge, to any person obtaining a * +# copy of this software and associated documentation files * +# (the “Software”), to deal in the Software without restriction, including * +# without limitation the rights to use, copy, modify, merge, publish, * +# distribute, sublicense, and/or sell copies of the Software, and to permit * +# persons to whom the Software is furnished to do so, subject to the * +# following conditions: * +# * +# The above copyright notice and this permission notice shall be included * +# in all copies or substantial portions of the Software. * +# * +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS * +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT * +# OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +# THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +#****************************************************************************# + # Import Modules from tkinter import * from tkinter import filedialog as fd From 23a93425be1bf6720089a2de7f79f857042b244e Mon Sep 17 00:00:00 2001 From: Abyssal Studios <69280445+Luca06Luwa@users.noreply.github.com> Date: Fri, 10 Mar 2023 11:55:50 +1100 Subject: [PATCH 5/7] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dabb544..a3afe9c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ * Converts jpg to png * Converts jpg/png to pdf * Converts jpg/png to ico +* Experimantal support for jfif to png Open the exe and select: jpg to png/png to jpg/jpg to pdf From f7980ca5cf3d3b002db06731251cccb8e8a0f1bc Mon Sep 17 00:00:00 2001 From: Luca06Luwa <69280445+Luca06Luwa@users.noreply.github.com> Date: Mon, 21 Aug 2023 22:20:04 +1000 Subject: [PATCH 6/7] Patch - Further improvements and other minor adjustments to enhance the user experience. --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 30d9511..71ce4a8 100644 --- a/main.py +++ b/main.py @@ -4,7 +4,7 @@ # * # Permission is hereby granted, free of charge, to any person obtaining a * # copy of this software and associated documentation files * -# (the “Software”), to deal in the Software without restriction, including * +# (the “Software”), to deal in the Software without restriction, including * # without limitation the rights to use, copy, modify, merge, publish, * # distribute, sublicense, and/or sell copies of the Software, and to permit * # persons to whom the Software is furnished to do so, subject to the * @@ -82,6 +82,7 @@ def jfif_to_png(): if import_filename.endswith(".jfif"): im1 = Image.open(import_filename) + im1 = im1.convert('RGBA') # where to save export_filename = fd.asksaveasfilename(defaultextension=".png") From c4105a7cff2fd450f9248b83537e54779d4a8f72 Mon Sep 17 00:00:00 2001 From: Luca06Luwa <69280445+Luca06Luwa@users.noreply.github.com> Date: Tue, 22 Aug 2023 09:07:48 +1000 Subject: [PATCH 7/7] added png to jfif for some reason idk why --- main.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 71ce4a8..e5a366a 100644 --- a/main.py +++ b/main.py @@ -94,6 +94,27 @@ def jfif_to_png(): messagebox.showerror("Error", "Input all Data") # end of jfif to png +# start of png to jfif + +def png_to_jfif(): + global im1 + + import_filename = fd.askopenfilename(filetypes=[("PNG File", '.png')]) + if import_filename.endswith(".png"): + + im1 = Image.open(import_filename) + + # where to save + export_filename = fd.asksaveasfilename(defaultextension=".jpg") + im1.save(export_filename) + im1 = im1.convert('RGBA') + + messagebox.showinfo("success ", "your Image converted to Jpg") + else: + # error + messagebox.showerror("Error", "Input all Data") +# end of png to jfif + # start of png to jpg def png_to_jpg(): @@ -216,7 +237,12 @@ def jpg_to_ico(): button8 = Button(root, text="Jfif -> Png", width=9, height=1, bg="purple", fg="white", font=("helvetica", 12, "bold"), command=jfif_to_png, relief=GROOVE) -button8.place(x=160, y=160) +button8.place(x=50, y=160) + +button9 = Button(root, text="Png -> Jfif", width=9, height=1, bg="purple", + fg="white", font=("helvetica", 12, "bold"), command=png_to_jfif, relief=GROOVE) + +button9.place(x=160, y=160) # end of button