Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

ofImage draw anti-aliasing

$
0
0

btw, if your forum background is indeed white, you won't actually see the images. I assume you can right-click each one to "Save Image As..." to get the files.

You can try this test in the imageLoaderExample project:
1) add the cloud PNGs to the /bin/data/Images folder.
2) replace everything in the setup method with:

    	transparency.load("images/clouds1.png");

3) replace everything in the draw method with:

ofSetHexColor(0xFFFFFF);
ofEnableAlphaBlending();
transparency.draw(sin(ofGetElapsedTimeMillis()/5000.0f) * 100 + 300, cos(ofGetElapsedTimeMillis()/5000.0f) * 100 + 300);
ofDisableAlphaBlending();

You will see that while the image is moving around the screen, its aliasing problem changes depending upon the X and Y position! At some positions, it disappears completely along parts of the cloud's edge.

I'm still looking for ideas! :smile: I also tried forcing the compression to none, and forcing the PNGs to a power of 2 size, but neither of these help.

-Todd


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>