- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for GrayModel (0.21 sec)
-
src/image/png/writer.go
switch cb { case cbG8: if gray != nil { offset := (y - b.Min.Y) * gray.Stride copy(cr[0][1:], gray.Pix[offset:offset+b.Dx()]) } else { for x := b.Min.X; x < b.Max.X; x++ { c := color.GrayModel.Convert(m.At(x, y)).(color.Gray) cr[0][i] = c.Y i++ } } case cbTC8: // We have previously verified that the alpha value is fully opaque. cr0 := cr[0]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 17:08:05 UTC 2024 - 15.4K bytes - Viewed (0) -
src/image/png/reader_test.go
defer w.Close() bounds := png.Bounds() cm := png.ColorModel() var bitdepth int switch cm { case color.RGBAModel, color.NRGBAModel, color.AlphaModel, color.GrayModel: bitdepth = 8 default: bitdepth = 16 } cpm, _ := cm.(color.Palette) var paletted *image.Paletted if cpm != nil { switch { case len(cpm) <= 2: bitdepth = 1
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
if !(Point{x, y}.In(p.Rect)) { return } i := p.PixOffset(x, y) p.Pix[i] = color.GrayModel.Convert(c).(color.Gray).Y } func (p *Gray) SetRGBA64(x, y int, c color.RGBA64) { if !(Point{x, y}.In(p.Rect)) { return } // This formula is the same as in color.grayModel. gray := (19595*uint32(c.R) + 38470*uint32(c.G) + 7471*uint32(c.B) + 1<<15) >> 24 i := p.PixOffset(x, y)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 34.9K bytes - Viewed (0) -
src/image/jpeg/reader.go
var d decoder if _, err := d.decode(r, true); err != nil { return image.Config{}, err } switch d.nComp { case 1: return image.Config{ ColorModel: color.GrayModel, Width: d.width, Height: d.height, }, nil case 3: cm := color.YCbCrModel if d.isRGB() { cm = color.RGBAModel } return image.Config{ ColorModel: cm,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 22.5K bytes - Viewed (0) -
src/image/png/reader.go
break } } else { if d.stage >= dsSeenIHDR { break } } } var cm color.Model switch d.cb { case cbG1, cbG2, cbG4, cbG8: cm = color.GrayModel case cbGA8: cm = color.NRGBAModel case cbTC8: cm = color.RGBAModel case cbP1, cbP2, cbP4, cbP8: cm = d.palette case cbTCA8: cm = color.NRGBAModel case cbG16:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 26K bytes - Viewed (0)