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(-) 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 hor
path: root/bin/1sh/var.h (unfollow)
Commit message (Collapse)Author
2019-07-14Add shotty -dJune McEnroe
2019-07-13Add shotty -cJune McEnroe
2019-07-13Add DL to shottyJune McEnroe
2019-07-12Color html rather than bodyJune McEnroe
If background-color is only set on body then overscroll in Safari reveals white.
2019-07-12Make author consistent and update URLsJune McEnroe
2019-07-12Move to www/text.causal.agencyJune McEnroe
2019-07-12Add new causal.agency with shotty shotsJune McEnroe
2019-07-12Use -s to infer terminal sizeJune McEnroe
2019-07-12Add DCH to shottyJune McEnroe
This makes htop mostly work. Scrolling region still missing.
2019-07-12Support insert mode in shottyJune McEnroe
This is how curses puts characters into the bottom-right cell of the terminal.
2019-07-11Don't do carriage return on line feedJune McEnroe
2019-07-11Interpret 256color-style SGRsJune McEnroe
2019-07-11Use inline style rather than <b>, <i>, <u>June McEnroe
2019-07-11Factor out clearJune McEnroe
2019-07-11Add bright option to shottyJune McEnroe
2019-07-11Output <b>, <i>, <u> in shottyJune McEnroe
2019-07-10Ignore SM and RMJune McEnroe
2019-07-09Add shotty man page and build itJune McEnroe
2019-07-09Add up -cJune McEnroe
2019-07-09Add options for default colors to shottyJune McEnroe
2019-07-08Use char literals consistentlyJune McEnroe