Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python how to get pixel values from image

from PIL import Image

def get_image(image_path):
    image = Image.open(image_path).convert("L")
    pixel_values = list(image.getdata())

    return pixel_values
 
PREVIOUS NEXT
Tagged: #python #pixel #values #image
ADD COMMENT
Topic
Name
9+7 =