contrib/examples/simpleover.c

Branch


Log

Author Commit Date CI Message
Cosmin Truta 3bca02e2 2025-06-01T22:40:38 examples: Refactor and reformat using clang-format Add contrib/examples/.clang-format, tailored to fit the existing code as closely as possible. The end goal is to set up automatic formatting for the entire libpng source tree. We're doing this experiment in this subdirectory, for now. Also make refactoring changes, as follows: * Rewrite the preprocessor checks `#if PNG_FOO_SUPPORTED` to stop compilation immediately, with a descriptive `#error` about what needs to be supported. * Rewrite and reflow comments, add braces and brackets, and make other minor modifications that are suited for the clang-format'ed code.
Glenn Randers-Pehrson 04773749 2015-12-02T19:50:48 [master] Imported from libpng-1.6.20.tar
Glenn Randers-Pehrson e7092bc5 2015-11-26T00:04:55 [libpng16] Imported from libpng-1.6.20rc01.tar
Glenn Randers-Pehrson 287fb892 2015-07-22T22:36:43 [master] Imported from libpng-1.6.18.tar
Glenn Randers-Pehrson 867f2ec0 2015-06-06T16:31:52 [libpng16] Imported from libpng-1.6.18beta07.tar
Glenn Randers-Pehrson d8d18fbb 2015-05-06T14:57:02 [libpng16] Imported from libpng-1.6.18beta03.tar
John Bowler 74428df2 2015-05-06T11:41:17 [libpng16] Improved DIV65535 algorithm in simpleover.c. By experiment, (x + (x>>16) + 32769) works as well as the previous form and avoids one shift.
Glenn Randers-Pehrson d6b1375b 2015-05-04T20:25:31 [libpng16] Trivial editing of comments in contrib/examples/simpleover.c
John Bowler 0f12df19 2015-05-04T19:58:41 [libpng16] Added PNG generation tool, fixed unitialized pointer in simpleover. Also added a comment to png.h pointing out that the pointer must be set to NULL! (simpleover crashes with any slightly complex command lines without this fix.)
John Bowler cde30789 2015-05-02T19:53:40 [libpng16] Added contrib/examples/simpleover.c, to demonstrate how to handle alpha compositing of multiple images, using the "simplified API"