Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python read png file

# Import OpenCV Library
import cv2

# Read the PNG Image in BGR format
img = cv2.imread("<PATH_TO_IMAGE_FILE>.png")

# Print the Shape of image as it is a Numpy Array
print("Image Shape:", img.shape)
 
PREVIOUS NEXT
Tagged: #python #read #png #file
ADD COMMENT
Topic
Name
3+8 =