Slick Forums
http://slick.ninjacave.com/forum/

Scaling image down causing artifacts
http://slick.ninjacave.com/forum/viewtopic.php?f=3&t=8363
Page 1 of 1

Author:  joonasvali [ Wed Jul 06, 2016 10:15 am ]
Post subject:  Scaling image down causing artifacts

I'm trying to do something rater simple, scale image down to specified size and draw it to screen. However it appears very blotched and isn't drawn nicely...
Code:
image.setFilter(Image.FILTER_NEAREST);
g = image.getGraphics();
g.setAntiAlias(true);
g.drawOval(actor.getX(), actor.getY(), 100, 100);
// Scaling down to correct size and drawing
image.draw(simulationX, simulationY, simulationWidth, simulationHeight);


This is painted in original size:
Image

This is the result: (Too blotchy)
Image

What might be wrong, I've tried to google the problem, but everyone suggests image.setFilter(Image.FILTER_NEAREST); does the trick while it's not working for me.
Increasing line width won't help, there's still no trace of antialias and the line looks sharp with pixels standing out.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/