You can use newer OpenCV python interface (if I'm not mistaken it is available since OpenCV 2.2). It natively uses numpy arrays:

import cv2
im = cv2.imread("abc.tiff")
print(type(im))

result:

<type 'numpy.ndarray'>
Answer from Andrey Kamaev on Stack Overflow
🌐
Note.nkmk.me
note.nkmk.me › home › python › numpy
Image processing with Python, NumPy | note.nkmk.me
October 20, 2020 - Passing the image data read by PIL.Image.open() to np.array() returns 3D ndarray whose shape is (row (height), column (width), color (channel)). from PIL import Image import numpy as np im = np.array(Image.open('data/src/lena.jpg')) print(type(im)) ...
🌐
scikit-image
scikit-image.org › skimage-tutorials › lectures › 00_images_are_arrays.html
Images are numpy arrays — Image analysis in Python
def my_function(any_image): float_image ... are typically stored in JPEG or PNG format. Since scikit-image operates on NumPy arrays, any image reader library that provides arrays will do....
🌐
AskPython
askpython.com › python › examples › convert-images-to-numpy-arrays
How to Convert Images to Numpy Arrays in Python - AskPython
April 21, 2026 - Pillow is the go-to library for basic image loading in Python. Pair it with numpy.asarray() and you get an array without installing anything heavy.
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-convert-images-to-numpy-array
How to Convert images to NumPy array? - GeeksforGeeks
September 30, 2022 - In order to get the value of each pixel of the NumPy array image, we need to print the retrieved data that got either from asarray() function or array() function.
🌐
w3resource
w3resource.com › python-exercises › numpy › read-png-image-data-into-numpy-array-using-python.php
Read PNG image data into NumPy array using Python
September 1, 2025 - Write a NumPy program that read image data from a PNG file into a NumPy array using an image processing library like PIL or opencv. ... from PIL import Image import numpy as np # Define the path to the PNG file image_path = 'image.png' # Open ...
🌐
Pluralsight
pluralsight.com › blog › tech guides & tutorials
Importing Image Data Into NumPy Arrays | Pluralsight
April 15, 2025 - To work with an OpenCV library, you need to install it in the virtual environment using pip install opencv-contrib-python. The cv2 package provides an imread() function to load the image. It also reads a PIL image in the NumPy array format.
🌐
DataCamp
datacamp.com › doc › numpy › converting-images-to-numpy
Converting Images to NumPy
Images are often converted to NumPy arrays to leverage efficient numerical computation, which is beneficial for tasks like machine learning and data analysis. from PIL import Image import numpy as np image = Image.open('path_to_image.jpg') image_array = np.array(image)
Find elsewhere
🌐
Appdividend
appdividend.com › convert-an-image-to-numpy-array-in-python
How to Convert an Image to Numpy Array in Python
October 9, 2025 - from PIL import Image import numpy ...(img_array)) # Output: <class 'numpy.ndarray'> When you are using OpenCV, it automatically reads images as NumPy arrays in BGR order (not RGB)....
🌐
GitHub
gist.github.com › simecek › e5a7a9de9d568b3e1a291a5982dbd3c2
Example of Reading Image Into Numpy Array · GitHub
Example of Reading Image Into Numpy Array · Display the source blob · Display the rendered blob Raw · Image+as+Numpy+Array.ipynb · Loading · Sorry, something went wrong. Reload? Sorry, we cannot display this file. Sorry, this file is invalid so it cannot be displayed.
🌐
Javatpoint
javatpoint.com › how-to-convert-images-to-numpy-array
How to Convert Images to NumPy Array - Javatpoint
How to Convert Images to NumPy Array with tutorial, tkinter, button, overview, canvas, frame, environment set-up, first python program, etc.
🌐
Clementine Blog
clementine.hashnode.dev › how-to-read-image-from-path-and-convert-to-a-numpy-array-in-python
How to read Image from Path and Convert to a NumPy Array in Python.
March 11, 2021 - Three methods to convert an image path to a NumPy array: Use OpenCV # OpenCV import cv2 img = cv2.imread(image_path) # reads an image in the BGR format img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # BGR -> RGB Use Matplotlib # Use Matplotlib from...
🌐
YouTube
youtube.com › videos
072 Turn Images Into NumPy Arrays - YouTube
Machine Learning and Data Science
Published: June 6, 2020
Views: 20K
🌐
SciPy Lecture Notes
scipy-lectures.org › advanced › image_processing
2.6. Image manipulation and processing using Numpy and Scipy — Scipy lecture notes
Images are arrays: use the whole numpy machinery. ... Open as an array the scikit-image logo (http://scikit-image.org/_static/img/logo.png), or an image that you have on your computer.
🌐
Pythoninformer
pythoninformer.com › python-libraries › numpy › numpy-and-images
PythonInformer - Image processing with pillow and NumPy
October 2, 2022 - PIL creates an RGB image by default because the array has 3 colour channels. We will see later that if there are 4 channels an RGBA image is created, and if there is only 1 channel a greyscale image is created. These are defaults, it is possible to use different colour spaces using the fromarray mode parameter, see the PIL documentation. Now let's add some code to create a NumPy image and then save it: import numpy as np from PIL import Image array = np.zeros([100, 200, 3], dtype=np.uint8) array[:,:100] = [255, 128, 0] #Orange left side array[:,100:] = [0, 0, 255] #Blue right side img = Image.fromarray(array) img.save('testrgb.png')
🌐
YouTube
youtube.com › shixak academics
Loading an image in python as a numpy array - YouTube
Loading an image in python as a numpy array using 3 APIs1. PIL, pillow, Python Imaging Library2. OpenCV(cv2)3. Scikit-Image(skimage)
Published: September 6, 2019
Views: 30K
🌐
YouTube
youtube.com › it guys
How to convert images to NumPy arrays - 20 - YouTube
Hello everyone! Today is the last video of the NumPy series! In this video we will learn how to convert images in NumPy arrays!This is really useful as you w...
Published: August 3, 2020
Views: 20K
🌐
Cloudinary
cloudinary.com › home › convert image to numpy array: methods, tips, and examples
Convert Image to NumPy Array: Methods, Tips, and Examples | Cloudinary
January 24, 2026 - By default, Matplotlib and scikit-image load images as NumPy arrays. Both are widely used in scientific computing, visualization, and machine-learning pipelines. While Pillow and OpenCV are common choices for general-purpose image handling, ...