mirror of
https://github.com/talgo-cloud/talgo-libwebp.git
synced 2026-03-16 18:55:58 -07:00
Fix comments
This commit is contained in:
parent
462078c647
commit
7c460481c0
1 changed files with 4 additions and 4 deletions
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"image/color"
|
"image/color"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Image represent image data which has RGB colors.
|
// RGBImage represent image data which has RGB colors.
|
||||||
// Image is compatible with image.RGBA, but does not have alpha channel to reduce using memory.
|
// RGBImage is compatible with image.RGBA, but does not have alpha channel to reduce using memory.
|
||||||
type RGBImage struct {
|
type RGBImage struct {
|
||||||
// Pix holds the image's stream, in R, G, B order.
|
// Pix holds the image's stream, in R, G, B order.
|
||||||
Pix []uint8
|
Pix []uint8
|
||||||
|
|
@ -47,7 +47,7 @@ func (p *RGBImage) RGBAAt(x, y int) color.RGBA {
|
||||||
return color.RGBA{p.Pix[i+0], p.Pix[i+1], p.Pix[i+2], 0xFF}
|
return color.RGBA{p.Pix[i+0], p.Pix[i+1], p.Pix[i+2], 0xFF}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ColorModel is RGB color model instance
|
// RGBModel is RGB color model instance
|
||||||
var RGBModel = color.ModelFunc(rgbModel)
|
var RGBModel = color.ModelFunc(rgbModel)
|
||||||
|
|
||||||
func rgbModel(c color.Color) color.Color {
|
func rgbModel(c color.Color) color.Color {
|
||||||
|
|
@ -75,6 +75,6 @@ func (c RGB) RGBA() (r, g, b, a uint32) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure Image implements image.Image.
|
// Make sure RGBImage implements image.Image.
|
||||||
// See https://golang.org/doc/effective_go.html#blank_implements.
|
// See https://golang.org/doc/effective_go.html#blank_implements.
|
||||||
var _ image.Image = new(RGBImage)
|
var _ image.Image = new(RGBImage)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue