( widthheight catim size width height catim filename 'zophie pngcatim format 'pngcatim format_description 'portable network graphicsy catim save('zophie jpg'after making an image object from zophie png and storing the image object in catimwe can see that the object' size attribute contains tuple of the image' width and height in pixels we can assign the values in the tuple to width and height variables in order to access with width and height individually the filename attribute describes the original file' name the format and format_description attributes are strings that describe the image format of the original file (with format_description being bit more verbosefinallycalling the save(method and passing it 'zophie jpgsaves new image with the filename zophie jpg to your hard drive pillow sees that the file extension is jpg and automatically saves the image using the jpeg image format now you should have two imageszophie png and zophie jpgon your hard drive while these files are based on the same imagethey are not identical because of their different formats pillow also provides the image new(functionwhich returns an image object--much like image open()except the image represented by image new()' object will be blank the arguments to image new(are as followsthe string 'rgba'which sets the color mode to rgba (there are other modes that this book doesn' go into the sizeas two-integer tuple of the new image' width and height the background color that the image should start withas four-integer tuple of an rgba value you can use the return value of the imagecolor getcolor(function for this argument alternativelyimage new(also supports just passing the string of the standard color name for exampleenter the following into the interactive shellfrom pil import image im image new('rgba'( )'purple'im save('purpleimage png' im image new('rgba'( )im save('transparentimage png'