-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
This library has the Encode API take in a pointer to image.Image (*image.Image
) instead of either the interface itself (which has an underlying value of a pointer) or a concrete struct such as *image.NRGBA
. This is usually a bad idea.
The lines that use this "pointer to interface" seem to only dereference the interface and not change it:
https://github.com/buckket/go-blurhash/blob/master/encode.go#L110-L111
height := (*rgba).Bounds().Max.Y
width := (*rgba).Bounds().Max.X
https://github.com/buckket/go-blurhash/blob/master/encode.go#L131
rt, gt, bt, _ := (*rgba).At(x, y).RGBA()
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request