File Is Not Saved In Particular Directory Using PIL Im.save
I tried to resize some image files and save them in other directory. and there's not any error but files didn't save in directory I designated. path = r'C:\Users\abc123\Desktop\var
Solution 1:
'+' does not actually add an element to the path, but concatenates with the string directly. So the program did in fact create a file, but not where you intended, but at "C:\Users\abc123\Desktop\MovieFile.jpg"
, assuming that there is file called File
in the "C:\Users\abc123\Desktop\various_image"
folder.
I think what you were trying to write was
resize_im.save(os.path.join(r"C:\Users\abc123\Desktop\Movie", f + ext), "JPEG" )
Post a Comment for "File Is Not Saved In Particular Directory Using PIL Im.save"