Skip to content

Commit

Permalink
Changed image.NRGBA to image.RGBA for Alpha 4.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
andlabs committed Sep 1, 2018
1 parent e987443 commit 9e7ee0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion image.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (i *Image) Free() {
}

// Append adds the given image as a representation of the Image.
func (i *Image) Append(img *image.NRGBA) {
func (i *Image) Append(img *image.RGBA) {
cpix := C.CBytes(img.Pix)
defer C.free(cpix)
C.uiImageAppend(i.i, cpix,
Expand Down
4 changes: 2 additions & 2 deletions zz_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ func appendImageNamed(i *ui.Image, which string) {
if err != nil {
panic(err)
}
nr, ok := img.(*image.NRGBA)
nr, ok := img.(*image.RGBA)
if !ok {
i2 := image.NewNRGBA(img.Bounds())
i2 := image.NewRGBA(img.Bounds())
draw.Draw(i2, i2.Bounds(), img, img.Bounds().Min, draw.Src)
nr = i2
}
Expand Down

0 comments on commit 9e7ee0d

Please sign in to comment.