Page 1 sur 1

Dialog box for saving PNG file?

Publié : 20 mai 2021 9:28
par JaggerLegend
Everytime i save a PNG image i see a dialog box about interlaced and filter type.
I would like not to see this dialog box everytime i save a PNG image.
The setting could be in Prefereces like "JPEG compression".

Re: Dialog box for saving PNG file?

Publié : 20 mai 2021 13:09
par Antonio
what is your PhotoFiltre version ?

Re: Dialog box for saving PNG file?

Publié : 23 juil. 2021 13:41
par DrPsyche
Hi,
I've been always using the defaut value. So this dialog box isn't crucial.

Re: Dialog box for saving PNG file?

Publié : 18 mars 2022 8:44
par Antonio
with the v11 you can use default values

Re: Dialog box for saving PNG file?

Publié : 20 juil. 2023 9:49
par leoa69
Creating a dialog box for saving a PNG file typically involves using a programming language or framework that allows you to interact with the operating system's file system. Below is an example of how you can create a simple dialog box for saving a PNG file using the Python programming language and the Tkinter library:

python

import tkinter as tk
from tkinter import filedialog

def save_png_file():
file_path = filedialog.asksaveasfilename(
defaultextension=".png",
filetypes=[("PNG files", "*.png"), ("All files", "*.*")]
)
if file_path:
# In real-world applications, you would save the PNG file here
print(f"File saved: {file_path}")

# Create the main application window
root = tk.Tk()
root.title("Save PNG File Dialog")

# Create a button to trigger the save dialog
save_button = tk.Button(root, text="Save PNG File", command=save_png_file)
save_button.pack(pady=20)

# Run the Tkinter event loop
root.mainloop()

When you run this Python script, it will open a simple graphical window with a button labeled "Save PNG File." Clicking the button will display a dialog box where you can specify the filename and location to save the PNG file. The asksaveasfilename function from the filedialog module allows you to customize the dialog and specify the default extension and file types.

Keep in mind that this is a basic example, and in a real-world application, you would need to handle file-saving logic appropriately, such as checking if the file already exists and handling errors. Additionally, the code provided here assumes you have Python and Tkinter installed on your system.