1 year ago

#381322

test-img

Gulzar

How to read only image width and height in python, without reading the data?

I want to read only metadata of an image, without reading the data. This should be much faster.

I found this question, with this answer, but not sure how to use it.

Also, I prefer a cv2 solution if one exists.

Not looking for:

import cv2

im = cv2.imread(mypath)
height, width, channels = im.shape

python

image

opencv

exif

0 Answers

Your Answer

Accepted video resources