const intSize … func abs(x int) int { … } // paeth implements the Paeth filter function, as per the PNG specification. func paeth(a, b, c uint8) uint8 { … } // filterPaeth applies the Paeth filter to the cdat slice. // cdat is the current row's data, pdat is the previous row's data. func filterPaeth(cdat, pdat []byte, bytesPerPixel int) { … }