Skip to content

Simplify wuffs_decode implementation#14

Open
nigeltao wants to merge 2 commits intorichgel999:mainfrom
nigeltao:wuffscpp
Open

Simplify wuffs_decode implementation#14
nigeltao wants to merge 2 commits intorichgel999:mainfrom
nigeltao:wuffscpp

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.

1 participant