From 35c47906f02e6ed0e6948133c4127e4ff2565b9d Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sun, 18 Feb 2018 12:43:10 -0500 Subject: Add pngo to README --- bin/README | 10 ++++++++++ bin/pngo.c | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/README b/bin/README index 947163d3..94429275 100644 --- a/bin/README +++ b/bin/README @@ -75,6 +75,16 @@ their detection. ssh tux.local pbpaste + pngo + +PNG optimizer. Does not support interlaced PNGs. + + - Discards ancillary chunks + - Discards unnecessary alpha channel + - Converts unnecessary truecolor to grayscale + - Applies a simple filter type heuristic + - Applies zlib's best compression + wake Broadcasts a wake-on-LAN packet to one of my machines. diff --git a/bin/pngo.c b/bin/pngo.c index 4db0d11d..14f86579 100644 --- a/bin/pngo.c +++ b/bin/pngo.c @@ -364,7 +364,7 @@ static void filterData(void) { } } -static void eliminateAlpha(void) { +static void discardAlpha(void) { if (!(header.color & ALPHA)) return; size_t sampleSize = header.depth / 8; size_t pixelSize = 4 * sampleSize; @@ -391,7 +391,7 @@ static void eliminateAlpha(void) { header.color &= ~ALPHA; } -static void eliminateColor(void) { +static void discardColor(void) { if (!(header.color & TRUECOLOR)) return; size_t sampleSize = header.depth / 8; size_t pixelSize = ((header.color & ALPHA) ? 4 : 3) * sampleSize; @@ -462,8 +462,8 @@ static void optimize(const char *inPath, const char *outPath) { scanlines(); reconData(); - eliminateAlpha(); - eliminateColor(); + discardAlpha(); + discardColor(); filterData(); free(lines); -- cgit 1.4.1 ter'>committer
path: root/2016/input/day08.txt (unfollow)
Commit message (Expand)Author
2020-11-22Day 7, part 2June McEnroe
2020-11-22Day 7June McEnroe
2020-11-22Day 6, part 2June McEnroe
2020-11-22Day 6June McEnroe
2020-11-22Day 5, part 2June McEnroe
2020-11-22Day 5June McEnroe
2020-11-22Day 4, part 2June McEnroe
2020-11-22Day 4June McEnroe
2020-11-22Day 3, part 2June McEnroe
2020-11-22Day 3, clean upJune McEnroe
2020-11-22Day 3June McEnroe
2020-11-22Day 2, part 2June McEnroe
2020-11-22Day 2June McEnroe
2020-11-22Day 1, part 2June McEnroe
2020-11-22Day 1June McEnroe
2020-11-22Move to 2016 directoryJune McEnroe