Hello. I am trying to have a ofFbo object with an ofImage drawn inside. This image is a copy of another image which has been resized.
image.loadImage(filePath); buffer.allocate(2000, 2000); ofImage tempImage; image.setImageType(OF_IMAGE_GRAYSCALE); tempImage.allocate(image.getWidth(), image.getHeight(), OF_IMAGE_GRAYSCALE); tempImage = image; image.resize(width, height); tempImage.resize(2000, 2000); buffer.begin(); ofClear(ofColor::white); ofSetColor(ofColor::white); tempImage.draw(0,0); buffer.end();
However, when I draw the buffer in the draw() method, I get it tinted in red, and I don’t know where the problem is. If I comment out the
setImageType method, the problem disappears. Am I doing something wrong with the allocation or do you know where the problem might be? Thanks!