![]() ![]() Traceback (most recent call last):įile "C:\Users\Jerry\anaconda3\Lib\site-packages\PIL\JpegImagePlugin.py", line 611, in _save The following errors will occur when you use the save() method directly.For example, if you save a PNG format image to a JPG format file like the below source code.Not all image formats can be converted with the save() method. ![]() Pillow_save_method_example() 1.2 save() convert(). # save the source image to the target image file, the target image file is a. # open the source image file with the pillow image class. # define the source image file path, the source image file is a. In the below example, I use the pillow module’s Image class’s save() method to convert the source.format: specify the format of the image, this parameter is optional.fp: the saved path of the picture, including the name of the picture, and the value is in string format.The syntax for the save() method is as follows.If the image format is specified, the image is stored in the specified format. When no file format is specified, it will store the image in the default image format. The save() method is used to save images.We will introduce them one by one with examples.Pillow provides 2 methods ( save()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |