1
General Discussion / Re: if self.isCoder(): post() #Programming Thread
« on: August 01, 2021, 10:15:49 pm »Code: [Select]Arturia_Picture = Image.open("Artoria_Face_Shots_1.jpg", 'r')
for line in Arturia_Picture:
Arturia_Picture.write(line)
First thing that jumps out to me is that you're trying to write to a file you've just opened for reading. Searching for "python image.open" led me to this article, regarding the PIL module.
Would this work?Code: [Select]Arturia_Picture = Image.open("Artoria_Face_Shots_1.jpg", 'r')
Arturia_Picture.show()
I'm going to try this in my code right now and let you know. Thank you!
EDIT: Okay so I uses some of the code as shown in the example that Bumber showed. But in addition I comented out that for loop as well as added the entire path.
I saw that as I added the entire path that Python gave me suggestions for what picture in my 'saved pictures' folder that I had. Picked the one I want and attempted to show it.
[Code/]
Arturia_Picture = Image.open("C:\Users\myName\Pictures\Saved Pictures\Artoria_Face_Shots_1.jpg", 'r')
Arturia_Picture.show()
[Code\]
After running this code I get a truncation error. I'm going to do some research on what that is. A simple google search gave me this: "In numerical analysis and scientific computing, truncation error is the error caused by approximating a mathematical process. Let's take three examples so that the myths surrounding the definition of truncation error can be laid to rest."
Thank you Bumber for your help. I think I made progress on my little project here.
