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?

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
Post a Comment