From near the beginning of the PIL Tutorial:

Once you have an instance of the Image class, you can use the methods defined by this class to process and manipulate the image. For example, let's display the image we just loaded:

     >>> im.show()

Update:

Nowadays the Image.show() method is formally documented in the Pillow fork of PIL along with an explanation of how it's implemented on different OSs.

Answer from martineau on Stack Overflow
🌐
TutorialsPoint
tutorialspoint.com › python_pillow › python_pillow_using_image_module.htm
Python Pillow - Using Image Module
To load the image, we simply import the image module from the pillow and call the Image.open(), passing the image filename. Instead of calling the Pillow module, we will call the PIL module as to make it backward compatible with an older module called Python Imaging Library (PIL).
🌐
Pillow Documentation
pillow.readthedocs.io › en › stable › reference › ImageFont.html
ImageFont module - Pillow (PIL Fork) 12.2.0 documentation
Which layout engine to use, if available: ImageFont.Layout.BASIC or ImageFont.Layout.RAQM. If it is available, Raqm layout will be used by default. Otherwise, basic layout will be used. Raqm layout is recommended for all non-English text. If Raqm layout is not required, basic layout will have better performance. You can check support for Raqm layout using PIL.features.check_feature() with feature="raqm".
Discussions

Image Processing in Python with Pillow
It's interesting that if you google some of the language in this post, you find that it is just paraphrased form more popular tutorials: A crucial class in the Python Imaging Library is the Image class. It is defined in the Image module and provides a PIL image on which manipulation operations can be carried out. An instance of this class can be created in several ways: by loading images from a file, creating images from scratch or as a result of processing other images. We'll see all these in use. To load an image from a file, we use the open() function in the Image module passing it the path to the image. from PIL import Image image = Image.open('unsplash_01.jpg') If successful, the above returns an Image object. If there was a problem opening the file, an IOError exception will be raised. After obtaining an Image object, you can now use the methods and attributes defined by the class to process and manipulate it. Let's start by displaying the image. You can do this by calling the show() method on it. This displays the image on an external viewer (usually xv on Unix, and the Paint program on Windows). image.show() You can get some details about the image using the object's attributes. # The file format of the source file. print(image.format) # Output: JPEG # The pixel format used by the image. Typical values are “1”, “L”, “RGB”, or “CMYK.” print(image.mode) # Output: RGB # Image size, in pixels. The size is given as a 2-tuple (width, height). print(image.size) # Output: (1200, 776) vs The most important class in the Python Imaging Library is the Image class, defined in the module with the same name. You can create instances of this class in several ways; either by loading images from files, processing other images, or creating images from scratch. To load an image from a file, use the open function in the Image module. import Image im = Image.open("lena.ppm") If successful, this function returns an Image object. You can now use instance attributes to examine the file contents. print im.format, im.size, im.mode PPM (512, 512) RGB ... If the file cannot be opened, an IOError exception is raised. http://effbot.org/imagingbook/introduction.htm More on reddit.com
🌐 r/Python
8
88
April 20, 2017
python - How to show PIL images on the screen? - Stack Overflow
I am doing some image editing with the PIL libary. The point is, that I don't want to save the image each time on my HDD to view it in Explorer. Is there a small module that simply enables me to se... More on stackoverflow.com
🌐 stackoverflow.com
python - How can I save an image with PIL? - Stack Overflow
I have just done some image processing using the Python image library (PIL) using a post I found earlier to perform fourier transforms of images and I can't get the save function to work. The whole... More on stackoverflow.com
🌐 stackoverflow.com
Using PIL (Pillow) and Image Resolution
The "pixels/inch" value is basically just extra metadata. As long as both images actually have the same amount of pixels, you're fine. More on reddit.com
🌐 r/learnpython
6
4
January 16, 2018
🌐
Pillow Documentation
pillow.readthedocs.io › en › stable › reference › ImageFile.html
ImageFile module - Pillow (PIL Fork) 12.2.0 documentation
In addition, it provides a Parser class which can be used to decode an image piece by piece (e.g. while receiving it over a network connection). This class implements the same consumer interface as the standard sgmllib and xmllib modules. from PIL import ImageFile fp = open("hopper.ppm", "rb") p = ImageFile.Parser() while 1: s = fp.read(1024) if not s: break p.feed(s) im = p.close() im.save("copy.jpg")
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-pillow-a-fork-of-pil
Python: Pillow (a fork of PIL) - GeeksforGeeks
April 28, 2025 - Pillow was announced as a replacement for PIL for future usage. Pillow supports a large number of image file formats including BMP, PNG, JPEG, and TIFF. The library encourages adding support for newer formats in the library by creating new file decoders. This module is not preloaded with Python.
🌐
Reddit
reddit.com › r/python › image processing in python with pillow
r/Python on Reddit: Image Processing in Python with Pillow
April 20, 2017 - It is defined in the Image module and provides a PIL image on which manipulation operations can be carried out. An instance of this class can be created in several ways: by loading images from a file, creating images from scratch ...
🌐
Pillow Documentation
pillow.readthedocs.io › en › stable › reference › ImageDraw.html
ImageDraw module - Pillow (PIL Fork) 12.2.0 documentation
The ImageDraw module provides simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and to generate graphics on the fly for web use. For a more advanced drawing library for PIL, see the aggdraw module.
Find elsewhere
🌐
Codecademy
codecademy.com › article › getting-started-with-image-processing-in-python-using-pillow
Getting Started with Image Processing in Python using Pillow | Codecademy
Pillow is a powerful image processing library that is used to perform a wide range of operations on images, such as resizing, cropping, rotating, and much more. It is a fork of the Python Imaging Library (PIL) which is a go-to library of Python to work with images...
🌐
Medium
medium.com › @sinchu.sr › image-processing-using-pil-8f00661350a6
Image Processing Using PIL. PIL is the Python Image processing… | by Sinchana S.R | Medium
April 10, 2020 - import os, sys # import the Python Image processing Library from PIL import Image for infile in os.listdir("./"): #print("file : " + infile) if infile[-3:] == "tif" or infile[-3:] == "bmp" : # print "is tif or bmp" outfile = infile[:-3] + "jpeg" # Create an Image object from an Image im = Image.open(infile) # Crop # (left,top,left+width,top+height) tuple cropped = im.crop((32,32,64,64)) #print("new filename : " + outfile) out = cropped.convert("RGB") out.save(outfile, "JPEG", quality=100) for filename in os.listdir(): if filename.endswith('.tif'): os.unlink(filename) #print(filename)
🌐
Nomidl
nomidl.com › home › image processing using pil (python imaging library)
Image Processing using PIL (Python Imaging Library) - Nomidl
December 12, 2024 - Unlock the power of image processing with PIL (Python Imaging Library): Learn techniques, methods, and applications for seamless manipulation.
🌐
Medium
medium.com › @techtutorsti › pil-python-50483266d053
Pil Python. The Python Imaging Library (PIL) is a… | by Techtutorsti | Medium
December 27, 2023 - Pil Python The Python Imaging Library (PIL) is a library in Python that provides capabilities for opening, manipulating, and saving many different image file formats. It’s widely used in Python for …
🌐
Reddit
reddit.com › r/learnpython › using pil (pillow) and image resolution
r/learnpython on Reddit: Using PIL (Pillow) and Image Resolution
January 16, 2018 -

I'm modifying images using PIL. I want mainly to convert the format of images, like jpg to png. I noticed that the resolution seems to change after using PIL.

I found this image of a tiger and got that its resolution is 350 pixels/inch.

Here is my code.

I wanted to see what effect changing the resolution/"quality" would have. It turns out that all images from PIL are read (via Preview on MacOS) as having a resolution of 72 pixels/inch no matter the desired quality.

quality = 1

Quality 1 image has resolution 72 pixels/inch

quality = 95

Quality 95 image has resolution 72 pixels/inch

If this is a false reading of the resolution, I'd be curious to know. In any case, my question is how, if even possible, can one adjust the resolution of the image via PIL?

🌐
GeeksforGeeks
geeksforgeeks.org › python › python-pil-image-resize-method
Python PIL | Image.resize() method - GeeksforGeeks
December 10, 2025 - Explanation: resize((200, 200), Image.LANCZOS) applies high-quality downscaling for a sharper result. Example 2: Here, we change only the width and automatically compute the height to maintain aspect ratio. ... from PIL import Image img = Image.open("bear.png") w, h = img.size new_w = 400 new_h = int(h * (new_w / w)) out = img.resize((new_w, new_h), Image.BICUBIC) out.show()
🌐
Swissmints
swissmints.com › startseite
Python Pil Image Module Pil PIL Image Module Not Found R ...
January 8, 2023 - Welcome to the Royal Army Website and Online Shop. We produce sugar free mints and energy chocolate with Guarana. Get an extra boost with a great taste.
🌐
Pillow Documentation
pillow.readthedocs.io › en › stable › reference › ImageOps.html
ImageOps module - Pillow (PIL Fork) 12.2.0 documentation
This function applies a non-linear mapping to the input image, in order to create a uniform distribution of grayscale values in the output image. ... mask – An optional mask. If given, only the pixels selected by the mask are included in the ...
🌐
DEV Community
dev.to › petercour › generate-images-with-python-pil-302k
Generate images with Python PIL - DEV Community
July 15, 2019 - #!/usr/bin/python3 from PIL import Image im= Image.new("RGB", (128, 128), "#FF0000") for i in range(0,256): im.paste((256-i,256-i,256-i),(i,i,128,128)) im.show()
🌐
Medium
medium.com › analytics-vidhya › process-images-with-python-pil-584d5c74e3fb
Process Images with Python PIL. Have you ever felt stuck trying to… | by Oteri Eyenike | Analytics Vidhya | Medium
December 5, 2020 - You can read the image through its various attributes such as mode, size, and format. We can use the Python Print() function. Replace the `size` attribute with `filter` and `mode` attributes.