This repository was archived by the owner on Dec 7, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +22
-16
lines changed Expand file tree Collapse file tree 1 file changed +22
-16
lines changed Original file line number Diff line number Diff line change 8
8
end
9
9
10
10
it "should write to a webp file" do
11
- @writer . write ( @path )
11
+ if Spec ::Helpers . match_vips_version ( ">= 7.42" )
12
+ @writer . write ( @path )
12
13
13
- # no webp reader
14
- #im = VIPS::Image.webp @path
15
- #im.x_size.should == @image.x_size
16
- #im.y_size.should == @image.y_size
14
+ # no webp reader
15
+ #im = VIPS::Image.webp @path
16
+ #im.x_size.should == @image.x_size
17
+ #im.y_size.should == @image.y_size
18
+ end
17
19
end
18
20
19
21
it "should set a default quality of 75" do
32
34
end
33
35
34
36
it "should write smaller images with lower quality settings" do
35
- @writer . quality = 10
36
- @writer . write ( @path )
37
- size1 = File . size @path
38
-
39
- @writer . quality = 90
40
- @writer . write ( @path )
41
- size2 = File . size @path
42
-
43
- size1 . should < size2 / 2
37
+ if Spec ::Helpers . match_vips_version ( ">= 7.42" )
38
+ @writer . quality = 10
39
+ @writer . write ( @path )
40
+ size1 = File . size @path
41
+
42
+ @writer . quality = 90
43
+ @writer . write ( @path )
44
+ size2 = File . size @path
45
+
46
+ size1 . should < size2 / 2
47
+ end
44
48
end
45
49
46
50
it "should create a webp writer from an image" do
49
53
end
50
54
51
55
it "should accept options on creation from an image" do
52
- writer = @image . webp ( nil , :quality => 22 )
53
- writer . quality . should == 22
56
+ if Spec ::Helpers . match_vips_version ( ">= 7.42" )
57
+ writer = @image . webp ( nil , :quality => 22 )
58
+ writer . quality . should == 22
59
+ end
54
60
end
55
61
56
62
it "should allow access to header fields" do
You can’t perform that action at this time.
0 commit comments