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

Add #ifndefs so compiles with TINY_DNG_LOADER_NO_STB_IMAGE_INCLUDE #45

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

andrewwillmott
Copy link
Contributor

Small compile fix... needed TINY_DNG_LOADER_NO_STB_IMAGE_INCLUDE as I'm just using it as a tiff loader at the moment.

@andrewwillmott
Copy link
Contributor Author

Just noticed my editor removed some trailing white space... lmk if you want it restored.

@syoyo
Copy link
Owner

syoyo commented Aug 22, 2024

Thanks! Confirmed the issue with

g++ -o test -DTINY_DNG_LOADER_NO_STB_IMAGE_INCLUDE -O0 -g -Wall -Werror test_loader.cc

In file included from test_loader.cc:8:
tiny_dng_loader.h: In function ‘bool tinydng::LoadDNGFromMemory(const char*, unsigned int, std::vector<tinydng::FieldInfo>&, std::vector<tinydng::DNGImage>*, std::string*, std::string*)’:
tiny_dng_loader.h:5752:23: error: ‘stbi_info_from_memory’ was not declared in this scope
 5752 |         int is_jpeg = stbi_info_from_memory(sr.data() + data_offset,
      |    
...

And the PR fixes it.

@syoyo syoyo merged commit 5eac0dd into syoyo:release Aug 22, 2024
6 checks passed
@andrewwillmott andrewwillmott deleted the andrew/stb_include_fix branch August 23, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants