mirror of https://mirror.trustie.net/root/bimg.git
Use faster encoding setting in test
Add avif test photo, that I had forgotten
This commit is contained in:
parent
e87ff245c1
commit
5c3317d077
|
@ -226,7 +226,7 @@ type Options struct {
|
|||
OutputICC string
|
||||
InputICC string
|
||||
Palette bool
|
||||
// Speed defines the AVIF encoders CPU effort.
|
||||
// Speed defines the AVIF encoders CPU effort. Valid values are 0-8.
|
||||
Speed int
|
||||
|
||||
// private fields
|
||||
|
|
Binary file not shown.
|
@ -33,7 +33,7 @@ func TestVipsSave(t *testing.T) {
|
|||
|
||||
for _, typ := range types {
|
||||
image, _, _ := vipsRead(readImage("test.jpg"))
|
||||
options := vipsSaveOptions{Quality: 95, Type: typ, StripMetadata: true, Speed: 8}
|
||||
options := vipsSaveOptions{Quality: 95, Type: typ, StripMetadata: true}
|
||||
|
||||
buf, err := vipsSave(image, options)
|
||||
if err != nil {
|
||||
|
@ -58,12 +58,12 @@ func TestVipsSaveTiff(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestVipsSafeAvif(t *testing.T) {
|
||||
func TestVipsSaveAvif(t *testing.T) {
|
||||
if !IsTypeSupportedSave(AVIF) {
|
||||
t.Skipf("Format %#v is not supported", ImageTypes[AVIF])
|
||||
}
|
||||
image, _, _ := vipsRead(readImage("test.jpg"))
|
||||
options := vipsSaveOptions{Quality: 95, Type: AVIF}
|
||||
options := vipsSaveOptions{Quality: 95, Type: AVIF, Speed: 8}
|
||||
buf, err := vipsSave(image, options)
|
||||
if err != nil {
|
||||
t.Fatalf("Error saving image type %v: %v", ImageTypes[AVIF], err)
|
||||
|
|
Loading…
Reference in New Issue