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

Pages: [1]
1
Graphics / Re: Screen capture in C++
« on: April 13, 2020, 12:59:26 pm »
I did it but
there is an error: Failed to create texture, invalid size (0x0) and Failed to save image "screen.png"

    sf::RenderWindow window;
    sf::Image image;
    image = window.capture();
    image.saveToFile( "screen.png" );

2
Graphics / Screen capture in C++
« on: April 12, 2020, 02:05:08 pm »
Welcome,

I want write program to screen capture. Im was trying to this:
    sf::Image oknoAplikacji;    sf::Image zrzutEkranu = oknoAplikacji.Capture();
    zrzutEkranu.SaveToFile( "zrzut-ekranu.png" );

But there's no .capture method.
I tryied to use SFML 2.5.1 and SFML 1.6

Pages: [1]
anything