How to save an image with the Python Image Library
I am a beginner in Python, so this question might be stupid but unfortunately I can't figure it out on my own. With the following script I want to create a black image and save it under the following path: C:/Users/User/Desktop/black.png def create_file(x=1000,y=10): img = Image.new('RGB', (x,y), "black") #creates a new black image img.save('C://Users/User/Desktop/black.png')` The point is now that I want to pretend the path, the filename and the filetype with the function is like that: create_image(x=1000,y=10,path=C://Users/bsimon/Desktop/,filename=black,filetype=png)` And there the struggle
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.