Skip to content

Commit

Permalink
test: vips determine image types test
Browse files Browse the repository at this point in the history
* test: vips determine image types test

* test: vips determine image types test

* test: update golden files
  • Loading branch information
cshum committed Mar 12, 2024
1 parent 7863bc6 commit cf1590e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions testdata/golden/meta/gopher-front.heif
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"format":"heif","content_type":"image/heif","width":202,"height":259,"orientation":0,"pages":1,"bands":4,"exif":{"ColorSpace":65535,"ComponentsConfiguration":"Y Cb Cr -","ExifVersion":"Exif Version 2.1","PixelXDimension":202,"PixelYDimension":259,"ResolutionUnit":2,"XResolution":"72009/1000","YCbCrPositioning":1,"YResolution":"72009/1000"}}
1 change: 1 addition & 0 deletions testdata/golden/meta/gopher.jp2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"format":"jp2k","content_type":"image/jp2","width":147,"height":200,"orientation":0,"pages":1,"bands":4,"exif":{}}
1 change: 1 addition & 0 deletions testdata/golden/meta/gopher.tiff
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"format":"tiff","content_type":"image/tiff","width":200,"height":100,"orientation":1,"pages":1,"bands":4,"exif":{}}
Binary file added testdata/golden/meta/sample.pdf
Binary file not shown.
6 changes: 5 additions & 1 deletion vips/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ func TestProcessor(t *testing.T) {
doGoldenTests(t, resultDir, []test{
{name: "meta jpeg", path: "meta/fit-in/100x100/demo1.jpg"},
{name: "meta gif", path: "meta/fit-in/100x100/dancing-banana.gif"},
{name: "meta svg", path: "meta/test.svg"},
{name: "base meta svg", path: "meta/test.svg"},
{name: "base meta jp2", path: "meta/gopher.jp2"},
{name: "base meta pdf", path: "meta/sample.pdf"},
{name: "base meta heif", path: "meta/gopher-front.heif"},
{name: "base meta tiff", path: "meta/gopher.tiff"},
{name: "meta format no animate", path: "meta/fit-in/100x100/filters:format(jpg)/dancing-banana.gif"},
{name: "meta exif", path: "meta/Canon_40D.jpg"},
{name: "meta strip exif", path: "meta/filters:strip_exif()/Canon_40D.jpg"},
Expand Down

0 comments on commit cf1590e

Please sign in to comment.