Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/image_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@
end

# added in 8.18
if Vips.respond_to? :vips_image_get_gainmap
if has_uhdr?
it "can modify gainmaps" do
# test the example code in image.rb doc comment for get_gainmap
def modify_gainmap image
Expand Down
8 changes: 6 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ def timg(name)
end

def has_jpeg?
Vips.type_find("VipsOperation", "jpegload") != nil
Vips.type_find("VipsOperation", "jpegload") != 0
end

def has_svg?
Vips.type_find("VipsOperation", "svgload") != nil
Vips.type_find("VipsOperation", "svgload") != 0
end

def has_uhdr?
Vips.type_find("VipsOperation", "uhdrload") != 0
end

RSpec.configure do |config|
Expand Down