So I was just writing a simple program to display an image. My image is a pixel tile. I noticed when I run the program it looked a little fuzzy. I took a screenshot and took a closer look..
Original Image (Transparent Background):

Original Image Closeup (on white background so you can see the pixelness):

"Fuzzy" Image Closeup:

As you can see, the program apparently "feathered" my image, even though I just told it to directly display it. Below is my code:
#include <SFML/Graphics.hpp>
int main() {
// Create the main window
sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Image Feathering");
// Load a sprite to display
sf::Image Img;
if(!Img.LoadFromFile("image.png"))
return EXIT_FAILURE;
sf::Sprite Tile(Img);
// Start the game loop
while(App.IsOpened()) {
// Process events
sf::Event Event;
while(App.GetEvent(Event)) {
// Close window : exit
if(Event.Type == sf::Event::Closed) {
App.Close();
}
}
// Clear screen
App.Clear();
// Draw the sprite
App.Draw(Tile);
// Update the window
App.Display();
}
return EXIT_SUCCESS;
}
Is there a way to directly display the image? Thanks.
