|
|
|
|
@ -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)
|
|
|
|
|
|