How can i draw smooth buffered images in java? -


we're making simple 2d game in java. every time draw images jagged , awful. can anti-alias text, our images in non-vector formats, can not apply anti-aliasing them. want smooth our .jpg images (they created maximum quality in photoshop): there way programmatically accomplish this?

enter image description here

bufferedimage goplaybut = imageio.read(getclass().getresourceasstream("/gameover/goplaybut.jpg"));  g.drawimage();  graphics2d g2d = (graphics2d) g; g2d.setrenderinghint(renderinghints.key_antialiasing, renderinghints.value_antialias_on); 

try adding interpolation:

g2d.setrenderinghint(renderinghints.key_interpolation, renderinghints.value_interpolation_bilinear); 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -