Skip to content

Inconsistant conversion from BGRA to BGR on png image #21694

@maingoh

Description

@maingoh
System information (version)
  • OpenCV => 4.5.5
  • Operating System / Platform => Ubuntu 20.04
  • Compiler => g++
Detailed description

Usually in opencv, the conversion from BGRA to BGR via IMREAD_COLOR or cvtColor set the transparent background as black.
However, for this image it seem to generate an inconsistant background.

Steps to reproduce
import cv2

img = cv2.imread(path, cv2.IMREAD_COLOR)
cv2.imshow('window', img)
cv2.waitKey(0)

Original image: img_rgba
Output image:
out_rgba

Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    question (invalid tracker)ask questions and other "no action" items here: https://forum.opencv.org

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions