Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Skate1168

Pages: [1]
1
Graphics / Image Feathering
« on: October 30, 2011, 04:31:33 pm »
Thanks! This fixed the problem perfectly.

Bilinear filter. Good to know. I will try to get my graphics terms right. ^_^

2
Graphics / Image Feathering
« on: October 30, 2011, 12:03:01 am »
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:

Code: [Select]
#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.  :)

Pages: [1]
anything