gocv
gocv copied to clipboard
cv.IMDecode is Empty
Description
Steps to Reproduce
test.png is Transparent picture 1.im, _ := ioutil.ReadFile("test.png") 2.resMat, err := cv.IMDecode(im, cv.IMReadColor) 3.resMat.Empty() is true
Your Environment
- Operating System and version: ubuntu20.04
- OpenCV version used: 4.5.5
- How did you install OpenCV? make install_static
- GoCV version used: 0.30.0
- Go version: 1.18.1
- Did you run the
env.sh
orenv.cmd
script before trying togo run
orgo build
?
But I use make install
is not true
I have the same issue reading .png and .webp files with transparency.
When I use gocv.IMRead(imgPath, gocv.IMReadUnchanged)
, it works.