Strange ofImage resizing behaviour


I am trying to do something pretty basic - load an ofImage, and display it at a smaller size on the screen, and to a new file.

The problem I am having is that I can load the image just fine, but when I try to output it to a smaller size via myImage.draw(0, 0, 640, 480); the colour channels get mixed up somehow and the image has a blue tinge.

I have no idea what the problem is… I have tried several approaches… load, resize, update, draw; load, draw resized; load, resize, update, save new file

Any ideas or hints would be helpful!


Well, I have found a workaround by simply loading the original image, drawing it to screen, then creating a new ofImage object and using grabScreen.

It seems like there is some bug in the resize method of ofImage?

yes this is a bug in ofImage with the channels getting swizzled and is mentioned here

plong0, could you please share source code?
That would help me a lot!