Skip to content

Commit

Permalink
Add double export test/
Browse files Browse the repository at this point in the history
refresh goldens for vips 8.13.1
  • Loading branch information
tonimelisma committed Oct 8, 2022
1 parent 5f0601e commit aaee584
Show file tree
Hide file tree
Showing 107 changed files with 25 additions and 7 deletions.
Binary file removed resources/bmp.Decode_BMP-macos-11.golden.png
Binary file not shown.
Binary file modified resources/gif-animated.GIF_Animated-macos-12.golden.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/gif-animated.GIF_Animated_Embed-macos-12.golden.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/gif-animated.GIF_Animated_PageDelay-macos-12.golden.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/gif-animated.GIF_Animated_PageDelay2-macos-12.golden.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/gif-animated.GIF_Animated_Resize-macos-12.golden.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/gif-animated.GIF_Animated_Rotate270-macos-12.golden.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/gif-animated.GIF_Animated_Rotate90-macos-12.golden.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/gif-animated.TestThumbnail_GIF-macos-12.golden.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified resources/jpg-24bit-icc-iec.ModulateHSV-macos-12.golden.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified resources/jpg-24bit-icc-iec.Pixelate-macos-12.golden.jpeg
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed resources/jpg-24bit.Add-macos-11.golden.jpeg
Diff not rendered.
Diff not rendered.
Binary file removed resources/jpg-24bit.Black-macos-11.golden.jpeg
Diff not rendered.
Binary file removed resources/jpg-24bit.Decode_JPG-macos-11.golden.jpeg
Diff not rendered.
Binary file removed resources/jpg-24bit.DrawRect-macos-11.golden.jpeg
Diff not rendered.
Diff not rendered.
Binary file removed resources/jpg-24bit.Embed-macos-11.golden.jpeg
Diff not rendered.
Diff not rendered.
Binary file removed resources/jpg-24bit.Flip-macos-11.golden.jpeg
Diff not rendered.
Binary file removed resources/jpg-24bit.GaussianBlur-macos-11.golden.jpeg
Diff not rendered.
Binary file modified resources/jpg-24bit.GaussianBlur-macos-12.golden.jpeg
Binary file removed resources/jpg-24bit.Invert-macos-11.golden.jpeg
Diff not rendered.
Binary file removed resources/jpg-24bit.Multiply-macos-11.golden.jpeg
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed resources/jpg-24bit.SimilarityRGB-macos-11.golden.jpeg
Diff not rendered.
Binary file removed resources/jpg-24bit.SimilarityRGBA-macos-11.golden.jpeg
Diff not rendered.
Binary file removed resources/jpg-24bit.SmartCrop-macos-11.golden.jpeg
Diff not rendered.
Diff not rendered.
Binary file removed resources/jpg-24bit.Zoom-macos-11.golden.jpeg
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file modified resources/png-24bit.AutoRotate_0-macos-12.golden.png
Diff not rendered.
Binary file modified resources/png-24bit.GetPointWhite-macos-12.golden.png
Diff not rendered.
Binary file modified resources/png-24bit.GetPointWhiteR-macos-12.golden.png
Diff not rendered.
Binary file modified resources/png-24bit.GetPointYellow-macos-12.golden.png
Binary file removed resources/png-24bit.Rank-macos-11.golden.png
Diff not rendered.
Binary file modified resources/png-24bit.Rank-macos-12.golden.png
Diff not rendered.
Binary file modified resources/png-24bit.TestImageRef_Linear1-macos-12.golden.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed resources/png-8bit.Decode_PNG-macos-11.golden.png
Diff not rendered.
Diff not rendered.
Binary file removed resources/tif.Tiff-macos-11.golden.tiff
Binary file not shown.
Binary file removed resources/with_alpha.ExtractBand-macos-11.golden.png
Diff not rendered.
Binary file modified resources/with_alpha.ExtractBand-macos-12.golden.png
Binary file removed resources/with_alpha.Flatten-macos-11.golden.png
Diff not rendered.
Binary file modified resources/with_alpha.Flatten-macos-12.golden.png
Diff not rendered.
Binary file modified resources/with_alpha.GetPoint_WithAlpha-macos-12.golden.png
Diff not rendered.
Binary file modified resources/with_alpha.GetPoint_WithAlpha2-macos-12.golden.png
14 changes: 7 additions & 7 deletions vips/image_golden_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ func TestImage_GaussianBlur(t *testing.T) {
return img.GaussianBlur(10.5)
}, nil, nil)
goldenTest(t, resources+"jpg-24bit.jpg", func(img *ImageRef) error {
return img.GaussianBlur(10.5,0.2)
return img.GaussianBlur(10.5, 0.2)
}, nil, nil)
}

Expand Down Expand Up @@ -740,7 +740,7 @@ func TestImage_Black(t *testing.T) {
assertGoldenMatch(t, resources+"jpg-24bit.jpg", buf, metadata.Format)
}

//vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --subsample-mode=auto --interlace --optimize-coding
// vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --subsample-mode=auto --interlace --optimize-coding
func TestImage_OptimizeCoding(t *testing.T) {
goldenTest(t, resources+"jpg-24bit-icc-iec.jpg",
nil,
Expand All @@ -755,7 +755,7 @@ func TestImage_OptimizeCoding(t *testing.T) {
)
}

//vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --subsample-mode=on
// vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --subsample-mode=on
func TestImage_SubsampleMode(t *testing.T) {
goldenTest(t, resources+"jpg-24bit-icc-iec.jpg",
nil,
Expand All @@ -768,7 +768,7 @@ func TestImage_SubsampleMode(t *testing.T) {
)
}

//vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --trellis-quant
// vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --trellis-quant
func TestImage_TrellisQuant(t *testing.T) {
goldenTest(t, resources+"jpg-24bit-icc-iec.jpg",
nil,
Expand All @@ -782,7 +782,7 @@ func TestImage_TrellisQuant(t *testing.T) {
)
}

//vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --overshoot-deringing
// vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --overshoot-deringing
func TestImage_OvershootDeringing(t *testing.T) {
goldenTest(t, resources+"jpg-24bit-icc-iec.jpg",
nil,
Expand All @@ -796,7 +796,7 @@ func TestImage_OvershootDeringing(t *testing.T) {
)
}

//vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --interlace --optimize-scans
// vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --interlace --optimize-scans
func TestImage_OptimizeScans(t *testing.T) {
goldenTest(t, resources+"jpg-24bit-icc-iec.jpg",
nil,
Expand All @@ -811,7 +811,7 @@ func TestImage_OptimizeScans(t *testing.T) {
)
}

//vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --quant-table=3
// vips jpegsave resources/jpg-24bit-icc-iec.jpg test.jpg --Q=75 --profile=none --strip --quant-table=3
func TestImage_QuantTable(t *testing.T) {
goldenTest(t, resources+"jpg-24bit-icc-iec.jpg",
nil,
Expand Down
18 changes: 18 additions & 0 deletions vips/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@ func TestMain(m *testing.M) {
os.Exit(ret)
}

func TestDoubleExport(t *testing.T) {
Startup(nil)

srcBytes, err := ioutil.ReadFile(resources + "copyright.jpeg")
require.NoError(t, err)

src := bytes.NewReader(srcBytes)
img, err := NewImageFromReader(src)
require.NoError(t, err)
require.NotNil(t, img)

_, _, err = img.ExportWebp(nil)
assert.NoError(t, err)

_, _, err = img.ExportPng(nil)
assert.NoError(t, err)
}

func TestImageRef_WebP(t *testing.T) {
Startup(nil)

Expand Down

0 comments on commit aaee584

Please sign in to comment.