Skip to content

cv2.imread changes behaviour between 62 and 64 release #662

Closed
@tomaszgrygiel

Description

@tomaszgrygiel

Expected behaviour

Using cv2.imread from 4.5.5.62 on a PNG image with rotation (EXIF orientation) results in correctly loaded image:

>>> import cv2
>>> a = cv2.imread("ex.png")
>>> a.shape
(844, 1500, 3)

Actual behaviour

Using cv2.imread from 4.5.5.64 on a PNG image with rotation results in image loaded with rotation ignored:

>>> import cv2
>>> a = cv2.imread("ex.png")
>>> a.shape
(1500, 844, 3)

Unfortunately I cannot provide image in question as it contains sensitive information.

Steps to reproduce

  • example code
import cv2
a = cv2.imread("ex.png")
a.shape
  • operating system
    Red Hat Ubi - Docker
  • architecture (e.g. x86)
    haswell
  • opencv-python version
    opencv-python-headless-4.5.5.64

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions