SFML community forums

Help => Graphics => Topic started by: inlinevoid on October 25, 2010, 01:28:06 am

Title: Image distortion?
Post by: inlinevoid on October 25, 2010, 01:28:06 am
I seem to be getting this weird distortion around the corners of a sprite when it's rotated.

Like so:
(http://www1.picturepush.com/photo/a/4413569/img/Picture-Box/bug.png)

You can clearly see it around the red guy because there's multiple copies on top of each other.  If you look closely you can see it around the green guy as well.

Like I said, it's only noticeable when the sprite is rotated and the distortion appears around the edges of the sprite.

Btw, the hands and the bodies are two different sprites (which is why you can see a gray box around the body and a bigger box around the whole thing).

Is this a bug or a common mistake in the code?
Title: Image distortion?
Post by: inlinevoid on October 25, 2010, 02:39:32 am
Hmm, it seems someone else has had this problem as well.

Quote from: "priomsrb"
It seems from 1.5 to 1.6 the rendering is slightly more glitchy. You can see in the screenshots that there are some faint lines which are the borders of the zombie sprite. It's small but I hope that it improves in the next version of SFML.

From http://www.sfml-dev.org/forum/viewtopic.php?t=2946&postdays=0&postorder=asc&start=0

Maybe some changes from 1.5 to 1.6 are the cause.  I'm using 1.6 as well.
Title: Image distortion?
Post by: Tank on October 25, 2010, 06:56:46 pm
sf::Image::SetSmooth( false )?
Title: Image distortion?
Post by: inlinevoid on October 25, 2010, 09:42:30 pm
Yes, that seems to have worked.  Thank you.