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 - guyyst

Pages: [1]
1
Graphics / Re: sf::image can't detect Windows image rotation for JPEG files
« on: February 26, 2016, 04:19:47 pm »
Or you could just actually rotate the image once and for all in some image manipulation program like Gimp or Photoshop (or something else) and then just use that rotated image...

Well this program is to be used as an image Viewer, so the whole point is to be able to handle and read any form of manipulation made to the image.

2
Graphics / Re: sf::image can't detect Windows image rotation for JPEG files
« on: February 25, 2016, 09:13:29 pm »
Yeah I didn't think to check if there's an EXIF tag for orientation. Libexif works just fine for reading that so I guess I can just apply the rotation myself. Thanks for the answer  :)

3
Graphics / sf::image can't detect Windows image rotation for JPEG files
« on: February 25, 2016, 07:44:09 pm »
When I rotate an image using the Windows explorer context menu options "Rotate left" or "Rotate right" the new image rotation is not picked up by SFML if it's a JPEG. The image is simply loaded in its original orientation.
This problem is not present with PNG or BMP files.

Out of curiosity I compared the original and rotated versions of both PNG and JPEG files in a hex editor and found that the bytes indicating the image resolution are indeed flipped for PNG but not for JPEG.

This leads me to believe that the problem lies more within Windows than SFML, but still raises the question why other programs, like paint.net and Photoscape, are able to detect the rotation.

4
Window / Re: Short flicker during program load when on the Main Display
« on: January 24, 2016, 06:00:01 pm »
Just a wild guess:
Is your graphics-driver up to date?

Yes, I'm using the driver version 353.82 on the GTX 780.

5
Window / Short flicker during program load when on the Main Display
« on: January 16, 2016, 03:59:15 am »
I am writing a small image viewer and when I start my program it shows the image I loaded, flickers to black, and back to the image.
Strangely, when I set up my window to start on a secondary monitor the flickering goes away.

I filmed my left monitor (configured as the main display) while opening an image (for testing it's just a green BG) with my editor. A series of images of the launch (~200 ms):
http://i.imgur.com/s9jc8n7.png
As you can see the screen starts out green but then flashes to black and back to green.

This is what it looks like when I set my other monitor (right) as the main display but make sure that the window is still being displayed on the left monitor using window.setPosition(sf::Vector2i(-1920, 0)).
http://i.imgur.com/F8W38I9.png
No flickering.

I stripped down my code to this and it's still happening:
int main()
{
        sf::RenderWindow window(sf::VideoMode(1920, 1080), "Test", sf::Style::None);
        window.setPosition(sf::Vector2i(0, 0));

        //window.setPosition(sf::Vector2i(-1920, 0));
        //This would make it work for my left monitor if it were configured as a secondary display

        while (window.isOpen())
        {
                sf::Event event;
                while (window.pollEvent(event))
                {
                        switch (event.type)
                        {
                        case sf::Event::Closed:
                                return 0;
                        }
                }
                window.clear(sf::Color::Green);
                window.display();
        }
        return 0;
}
 

Changing the window style to full screen doesn't help either.
If I were to offset the window by 1+ pixel, so that the task bar is overlapping the window, the issue is gone.
Is this a problem with full screen/borderless full screen (achieved with sf::style::None) on the main display, or just the expected behavior for such an application?

Pages: [1]
anything