Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Ray committed Aug 30, 2024
1 parent cf83cb7 commit 3b33ec4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ func verticalFlip(rgba *image.RGBA) {

type DecoderFunc func(io.Reader) (image.Image, error)

// DefaultDecoderFunc is a DecoderFunc that uses image.Decode to decode images.
// In order to decode, you must import the image formats you wish to use.
// ex. import _ "image/png"
func DefaultDecoderFunc(r io.Reader) (image.Image, error) {
i, _, err := image.Decode(r)
return i, err
Expand Down

0 comments on commit 3b33ec4

Please sign in to comment.