Hello mates,
I was wondering if in that vast amount of knowledge floating around here if any of you knew how I could save an image using Python 3.x. I know that PIL is a great, and easy option for Python 2, but I assume there must be some way to do this with 3. Ideas?

In the mean time I'm committing a horrible offense by assuming the user won't mess with the location of their image files "and that they only use gifs but that's another story altogether" and doing:

###Save Image###
        contact_image={self.name1.capitalize(): self.file1}
        pics.update(contact_image)
        f=open('piclocs.dat','wb+')
        pickle.dump(pics,f)
        f.close()

where pics is a dictionary of the key "names" and their respective getfilename() locations "also know as self.file1 in this case"

are jpg images completely unsupported for tkinter without PIL?

Do you know how to set this up?

Until now I have been satisfied to code for PIL in Python 2

Well if you do ever get one of these up and running let me know how you did it, it looks like I might need to compile the C files or something along those lines

For all searching for this I found a GREAT source for Python 3 PIL with easy installation and confirmed operational http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil

Test notes:
running on windows vista
running in tkinter on python 3.2.2
jpeg support confirmed using ImageTk.PhotoImage

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.