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

Simplify wuffs_decode implementation #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nigeltao
Copy link

Wuffs has a low-level C API, necessary if e.g. decoding an animated
image (or decoding incrementally over the network) while concurrently
doing other work, and a high-level C++ API. fpng_test just wants to
decode a still (non-animated) PNG image whose compressed form is
entirely in memory, so it can use the simpler C++ API.

Wuffs has a low-level C API, necessary if e.g. decoding an animated
image (or decoding incrementally over the network) while concurrently
doing other work, and a high-level C++ API. fpng_test just wants to
decode a still (non-animated) PNG image whose compressed form is
entirely in memory, so it can use the simpler C++ API.
This makes it clearer that the caller is responsible for freeing the
returned pixel buffer p. Freeing may be implicit, RAII style, when the
std::unique_ptr p goes out of scope.
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.

None yet

1 participant