Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stb_image and Image documentation #2322

Merged
merged 2 commits into from Dec 28, 2022

Conversation

kimci86
Copy link
Contributor

@kimci86 kimci86 commented Dec 28, 2022

Description

Updates stb_image.h and stb_image_write.h with latest version from stb.
The diffs seems to show that every line changed but that is because we used CRLF line endings instead of LF (probably by mistake).

Also updates Image::loadFromX methods documentation to mention every supported format.

This PR is related to this project card: https://github.com/SFML/SFML/projects/4#card-14010188

Tasks

  • Tested on Linux
  • Tested on Windows
  • Tested on macOS
  • Tested on iOS
  • Tested on Android

How to test this PR?

There is not much to test besides compilation.
Anyways I made this example program to check that loading PNM images succeeds for supported format variants.

#include <SFML/Graphics.hpp>
#include <cassert>

int main()
{
    auto image = sf::Image{};
    assert(image.loadFromFile("logo.pnm"));
    assert(image.loadFromFile("logo.pgm"));
    assert(!image.loadFromFile("logo.pbm"));
    assert(!image.loadFromFile("logo_ascii.pnm"));
    assert(!image.loadFromFile("logo_ascii.pgm"));
}

Image files: logo.zip

@eXpl0it3r eXpl0it3r added this to Discussion in SFML 2.6.0 via automation Dec 28, 2022
@eXpl0it3r eXpl0it3r added this to the 2.6 milestone Dec 28, 2022
SFML 2.6.0 automation moved this from Discussion to Ready Dec 28, 2022
@eXpl0it3r eXpl0it3r merged commit f0b4493 into SFML:2.6.x Dec 28, 2022
SFML 2.6.0 automation moved this from Ready to Done Dec 28, 2022
@eXpl0it3r
Copy link
Member

Thanks for doing this update! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
SFML 2.6.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants