- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for bytesPerPixel (0.47 sec)
-
src/image/png/reader.go
// check above that width != 0, and so len(cdat) != 0. for i := 0; i < bytesPerPixel; i++ { cdat[i] += pdat[i] / 2 } for i := bytesPerPixel; i < len(cdat); i++ { cdat[i] += uint8((int(cdat[i-bytesPerPixel]) + int(pdat[i])) / 2) } case ftPaeth: filterPaeth(cdat, pdat, bytesPerPixel) default: return nil, FormatError("bad filter type") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 26K bytes - Viewed (0) -
src/image/png/reader_test.go
} } func benchmarkDecode(b *testing.B, filename string, bytesPerPixel int) { data, err := os.ReadFile(filename) if err != nil { b.Fatal(err) } cfg, err := DecodeConfig(bytes.NewReader(data)) if err != nil { b.Fatal(err) } b.SetBytes(int64(cfg.Width * cfg.Height * bytesPerPixel)) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 24 12:12:12 UTC 2022 - 28.5K bytes - Viewed (0) -
src/image/image.go
// // This panics instead of returning an error because of backwards // compatibility. The NewXxx functions do not return an error. func pixelBufferLength(bytesPerPixel int, r Rectangle, imageTypeName string) int { totalLength := mul3NonNeg(bytesPerPixel, r.Dx(), r.Dy()) if totalLength < 0 { panic("image: New" + imageTypeName + " Rectangle has huge or negative dimensions") } return totalLength }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 34.9K bytes - Viewed (0)