png toCv issues
andreiantonescu opened this issue · comments
Hi,
I seem to be running in some issues loading pngs as ofImages and then converting to Mats through toCv. I am running OS X 10.10 with OF 0.8.4 and the latest ofxCv cloned today.
I've edited the empty project example from ofxCv with the following code:
--ofApp.h:
cv::Mat convertMat;
ofImage test;
--ofApp.cpp:
using namespace ofxCv;
using namespace cv;
void ofApp::setup() {
test.loadImage("/Users/andreiantonescu/Desktop/testscreen.png");
convertMat = toCv(test);
}
void ofApp::update() {
}
void ofApp::draw() {
drawMat(convertMat, 0, 0); }
The testscreen.png is just a cropped screenshot of my desktop, you can view it here: http://i.imgur.com/24Uu8C2.png. I get the following, sort of glitched output in the app: http://i.imgur.com/RhYqQbf.png
If I change the file format to jpg everything works fine.
Thanks
thank you for reporting and documenting this bug. this was part of some code i needed to refactor, it should be less experimental now.