chunky_png_subimage 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da20549fc9b756eb7840dfc2bdfdb60b02e943bd
4
- data.tar.gz: c05cdb097824ed921eaf11265da07c2873d984e9
3
+ metadata.gz: b831ded7991e426e5ea0b3cb450e0babcdc9eea3
4
+ data.tar.gz: 2eed01e388eb872bea4212e28484dc451b901c18
5
5
  SHA512:
6
- metadata.gz: 2b9dda54cf3c83b7de078603c3ee938ea278219eab6e77a1aae2a31cb218f5bc0e46d357849ad6b11b606221a91e2c22bb1bf4086b27ab9adc5c087dc3bb41d2
7
- data.tar.gz: 14b5c17e1b9daf916d3ac1e8224a0745538784773c72773db159eb2318e39a54acee9ee41ef06fdd25fbe74853285b5861602828fb00d5bd3a3fef9895e374e1
6
+ metadata.gz: 4bd73017a35271c8805c42c4dab5b3b4f7574eeab48784989c464812add7bd6a369bbe4e0a3b199fa518705447141543470142e0def6b16ef7d089d78143d0f5
7
+ data.tar.gz: 1e0ad1dbdb047ab4caaf1a7c61e3ea39bc1fbe48ffbc49c9a5e3d436576021a5e54ffa9fbdf4ab3bc8b6c1a17328fedfb5d94700b6ee7c4409db411cb9cba3b8
@@ -33,10 +33,10 @@ static VALUE search_single_subimage(const unsigned int *img, const int imgWidth,
33
33
 
34
34
  c = sub[s1y * subWidth + s1x];
35
35
 
36
- for (y = searchY; y < searchY + searchHeight; y++)
36
+ for (y = searchY; y < searchY + searchHeight - subHeight; y++)
37
37
  {
38
38
  int x = 0;
39
- for (x = searchX; x < searchX + searchWidth; x++)
39
+ for (x = searchX; x < searchX + searchWidth - subWidth; x++)
40
40
  {
41
41
  if (img[(y + s1y) * imgWidth + x + s1x] == c)
42
42
  {
@@ -69,7 +69,7 @@ static VALUE search_single_subimage(const unsigned int *img, const int imgWidth,
69
69
  }
70
70
  }
71
71
  /* if 'break' has been used */
72
- if (x != searchX + searchWidth)
72
+ if (x != searchX + searchWidth - subWidth)
73
73
  break;
74
74
  }
75
75
 
@@ -1,3 +1,3 @@
1
1
  module ChunkyPNGSubimage
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chunky_png_subimage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Mingulov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-16 00:00:00.000000000 Z
11
+ date: 2014-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chunky_png