Skip to content

Commit

Permalink
test: add reference image for output.max
Browse files Browse the repository at this point in the history
The normalised difference against pixbuf version is 0.0158998. Manual visual comparison revealed that the vips image is slightly crisper

The tolerance has been added to handle discrepancy between libvips 8.14.1 used in development and libvips 8.15.1 used by CI
  • Loading branch information
knarewski committed Nov 22, 2024
1 parent 6cdfbcd commit 9835a20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions spec/morandi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
end
end

describe 'when given an output.max option', vips_wip: processor_name == 'vips' do
describe 'when given an output.max option' do
let(:options) { { 'output.max' => max_size } }
let(:max_size) { 200 }

Expand All @@ -234,7 +234,8 @@
expect(processed_image_width).to be <= (max_size)
expect(processed_image_height).to be <= (max_size)

expect(file_out).to match_reference_image('plasma-constrained-output-size')
expect(file_out).to match_reference_image(reference_image_prefix, 'plasma-constrained-output-size',
tolerance: 0.006)
end
end

Expand Down

0 comments on commit 9835a20

Please sign in to comment.