lib/nakal/base_screen.rb in nakal-1.0.0 vs lib/nakal/base_screen.rb in nakal-1.0.1
- old
+ new
@@ -25,10 +25,10 @@
@image.crop(x_start, y_start, width_to_consider, height_to_consider)
end
end
def compare screen
- @image.fuzz= 5 * Magick::QuantumRange / 100.0
+ @image.fuzz= Nakal.fuzz * Magick::QuantumRange / 100.0
total_pixel = @image.rows * @image.columns
diff_img, no_of_pixels_mismatch = self.apply_mask.strip.compare_channel(screen.apply_mask.strip, Magick::AbsoluteErrorMetric)
diff_screen = Nakal.current_platform::Screen.new("#{@name}_diff", :none, diff_img)
percentage_diff = (no_of_pixels_mismatch/total_pixel)*100
return diff_screen,percentage_diff