Draw image result in OF not exactly same as image file open in preview

I have the below attached image, I draw this image in OF, the image is slightly different in OF compare with the image open with some image display tool such as Preview in iMac. The Preview image is slight paler, and the image in OF looks slightly sharper. The difference is small, but if look closely, there is some difference. What is the reason behind?

The code I used in OF to display the image is just very basic one:
ofBackground(255);
ofEnableAlphaBlending();
img.draw(0, 0, ofGetWidth(), ofGetHeight());

One more thing is the image has alpha channel.

Also when reading out the fbo to save to file, the saved file look slight different from the original screen image, the save files seems smoothed compare to the screen.

The code used for saving fbo is just the typical one:
fboFloat.readToPixels(outPix);
ofSaveImage(outPix, “screen.png”, OF_IMAGE_QUALITY_BEST);

How to lossless save fbo image to a file?

Hi @EricLiu,
If the image has transparecy, it might be affecting. Preview uses a gray background, so anything transparent will blend with the gray background. Also Preview might be be color proofing your image, based on it’s color profile. On OF, in your case you are rendering over a white background and it might not deal with the image color profile.
As for the FBO, I’ve seen some issues of the kind before. Cant recall what was the fix but you should search the forum for fbo stuff.

For saving lossless images save them as .tiff

best

Hi,

I’m stuck on a similar issue. Did you guys manage to solve this?

@roymacdonald, I changed the background of Preview to white and the difference is still there. If I open the image on any other software (Photoshop, Chrome, Firefox, Preview, etc) they show exactly the same colors. So far, OF is the only place where the image shows a different result…