mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-30 23:36:24 +02:00
add support for bmp images
handle decoding and encoding bmp images with transformations. Because this isn't a popular file format, we don't actually expose it as an option for format transformation. Fixes #182
This commit is contained in:
parent
1569bfda30
commit
d4ba5205ff
2 changed files with 9 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/disintegration/imaging"
|
||||
"golang.org/x/image/bmp"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -111,6 +112,7 @@ func TestTransform(t *testing.T) {
|
|||
encode func(io.Writer, image.Image)
|
||||
exactOutput bool // whether input and output should match exactly
|
||||
}{
|
||||
{"bmp", func(w io.Writer, m image.Image) { bmp.Encode(w, m) }, true},
|
||||
{"gif", func(w io.Writer, m image.Image) { gif.Encode(w, m, nil) }, true},
|
||||
{"jpeg", func(w io.Writer, m image.Image) { jpeg.Encode(w, m, nil) }, false},
|
||||
{"png", func(w io.Writer, m image.Image) { png.Encode(w, m) }, true},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue