screenpress 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/screenpress/compare.rb +6 -1
- data/lib/screenpress/version.rb +1 -1
- metadata +1 -1
data/lib/screenpress/compare.rb
CHANGED
@@ -45,8 +45,13 @@ module Screenpress
|
|
45
45
|
# Run through all of the pixels on both org image, and fresh image. Change the pixel color accordingly.
|
46
46
|
def update_diff_index(x, y, pixel)
|
47
47
|
lowest_score = 1
|
48
|
-
return if pixel == fresh_image[x,y]
|
49
48
|
|
49
|
+
begin
|
50
|
+
return if pixel == fresh_image[x,y]
|
51
|
+
rescue ChunkyPNG::OutOfBounds
|
52
|
+
# off the edge!
|
53
|
+
end
|
54
|
+
|
50
55
|
# try a bit in each direction to account for differences
|
51
56
|
[-2, -1, 0, 1, 2].each do |yd|
|
52
57
|
[-1, 0, 1].each do |xd|
|
data/lib/screenpress/version.rb
CHANGED