Conver ofImage to ofxCvColorImage?


#1

See an attached screenshot. I made ofImage(left) from ofFbo and converted to ofxCvColorImage(right); What’s wrong with this converting?

fbo.begin();
ofClear(0, 0, 0, 255);
.......drawing somthing
fbo.end();    

fbo.readToPixels(pixels);
image.setFromPixels(pixels);
image.update();   
image.draw(0, 0);


colorImg.setFromPixels(image.getPixels());
colorImg.draw(100, 0);


#2

is the fbo RGBA (thus has an extra channel when you put it in a color image) ?
does the width match?

This code snippet is missing some info, can you possible upload the whole sketch or add a little more info?