fix alpha channel in rescale. gah, that was ugly.
Ted Unangst tedu@tedunangst.com
Mon, 29 Apr 2019 18:14:41 -0400
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
image.go
→
image.go
@@ -58,7 +58,7 @@ return delineate((l1 + l2 + l3 + l4) / 4.0)
} func squish(d []byte, s1, s2, s3, s4 int) byte { - return uint8((uint32(s1) + uint32(s2)) / 2) + return uint8((uint32(d[s1]) + uint32(d[s2]) + uint32(d[s3]) + uint32(d[s4])) / 4) } func vacuumwrap(img image.Image, format string) ([]byte, string, error) {