mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-13 09:20:29 -07:00
refactor: remove colorspace feature
This commit is contained in:
parent
8abe7b850c
commit
210c7b4bdc
5 changed files with 1 additions and 68 deletions
|
|
@ -45,25 +45,6 @@ func TestRotate(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func testColorspace(t *testing.T) {
|
||||
options := Options{Colorspace: true}
|
||||
buf, _ := Read("fixtures/sky.jpg")
|
||||
|
||||
newImg, err := Resize(buf, options)
|
||||
if err != nil {
|
||||
t.Errorf("Resize(imgData, %#v) error: %#v", options, err)
|
||||
}
|
||||
|
||||
if DetermineImageType(newImg) != JPEG {
|
||||
t.Fatal("Image is not jpeg")
|
||||
}
|
||||
|
||||
err = Write("fixtures/test_color_out.jpg", newImg)
|
||||
if err != nil {
|
||||
t.Fatal("Cannot save the image")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCorruptedImage(t *testing.T) {
|
||||
options := Options{Width: 800, Height: 600}
|
||||
buf, _ := Read("fixtures/corrupt.jpg")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue