WIP: Add initial support for the QOI image format #147
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for the new "Quite OK Image" format (qoi).
This PR is currently labeled as ⚠ work in progress ⚠ because:
qoi.h
doesn't seem to have a way for querying the number of color channels in a file when loading it, analogous to stb_image'sint *channels_in_file
output parameter (see The number of channels should be encoded in the QOI header phoboslab/qoi#16);qoi.h
does not have functions that take in some parameter likestbi_io_callbacks
. Hence, I'm usingpath.str().c_str()
directly for loading and saving the files (instead of C++ streams). Please let me know if this is a problem, or if the code can be kept this way.Other notes:
filesystem::path&
->::filesystem::path&
in theinclude/tev/imageio/Image*.h
files, as Visual Studio warns aboutfilesystem
being ambiguous;ostream& iStream
->ostream& oStream
insrc/imageio/StbiLdrImageSaver.cpp
, for consistency;qoi.h
being a C99 file (also, seesrc/imageio/QoiImplementation.c
).