Skip to content

Commit

Permalink
feat: support tiff images
Browse files Browse the repository at this point in the history
closes #126
  • Loading branch information
sentriz committed Nov 20, 2024
1 parent 8c48df7 commit 47a38db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions cliphist.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

"go.senan.xyz/flagconf"
_ "golang.org/x/image/bmp"
_ "golang.org/x/image/tiff"

bolt "go.etcd.io/bbolt"
)
Expand Down
10 changes: 6 additions & 4 deletions cliphist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (

"github.com/rogpeppe/go-internal/testscript"
"golang.org/x/image/bmp"
"golang.org/x/image/tiff"
)

func TestMain(m *testing.M) {
Expand All @@ -39,10 +40,11 @@ func TestMain(m *testing.M) {
return 0
},

"gif": func() int { _ = gif.Encode(os.Stdout, testImage, nil); return 0 },
"jpg": func() int { _ = jpeg.Encode(os.Stdout, testImage, nil); return 0 },
"png": func() int { _ = png.Encode(os.Stdout, testImage); return 0 },
"bmp": func() int { _ = bmp.Encode(os.Stdout, testImage); return 0 },
"gif": func() int { _ = gif.Encode(os.Stdout, testImage, nil); return 0 },
"jpg": func() int { _ = jpeg.Encode(os.Stdout, testImage, nil); return 0 },
"png": func() int { _ = png.Encode(os.Stdout, testImage); return 0 },
"bmp": func() int { _ = bmp.Encode(os.Stdout, testImage); return 0 },
"tiff": func() int { _ = tiff.Encode(os.Stdout, testImage, nil); return 0 },
}))
}

Expand Down

0 comments on commit 47a38db

Please sign in to comment.