rpdiff 1.0.1 → 1.0.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rpdiff +4 -5
  3. data/lib/rpdiff.rb +2 -6
  4. metadata +6 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f1447a1f0f2a6f54eaf67cdd5cb0f60e40dc9ea
4
- data.tar.gz: 5c8365e67294b411f0702ef87c6c80997afc2560
3
+ metadata.gz: f262506859e8d511829e9f8deb1e4e1378896e9b
4
+ data.tar.gz: 42c27b0e6a272f192449f618cf9ae16293615d76
5
5
  SHA512:
6
- metadata.gz: 89d9fe65bb72501dcc64b5fe71df111e65374d7ac29ec9789a27066f149c36d935bb376c0d7714f1b7407b695ca5c9018cb5f55fbfd2397d2bd3d981b6756625
7
- data.tar.gz: 6362579a759f6a945cdbb6b3632163659684ac520eb1754a4f30ea12fdb5a438965ad6db85dfcd1952380caecb8f01f455df6f037e96bb10b3a1610b5e685998
6
+ metadata.gz: 1fb0ce55655306af5c0daa676809a3343ccbd5853465c02a46970c94886cc33f1118c532234042774b9b182e9dc6ec1681fefb355bb15056b92709e67818cbbd
7
+ data.tar.gz: 198f13ede8b5d1fa0f8d3900dd85b63fe98abe599fe7a3eb1ff67e9b2da640a64605e421b9e66e8c40601c1c03ee43a7c50ad22d9c260405adce2373cb22fb9e
data/bin/rpdiff CHANGED
@@ -7,21 +7,20 @@ options = {}
7
7
  OptionParser.new do |opts|
8
8
  opts.banner = "Compares image1.tif and image2.tif using a perceptually based image metric. Options:"
9
9
 
10
- opts.on("-verbose", "Turns on verbose mode") {|val| options[:verbose] = val}
11
- opts.on("-debug", "Turns on perceptualdiff command line output") {|val| options[:debug] = val}
10
+ opts.on("-verbose", "Turns on verbose mode") {|val| options[:verbose] = nil}
11
+ opts.on("-debug", "Turns on perceptualdiff command line output") {|val| options[:debug] = nil}
12
12
  opts.on("-output out.ppm", String, "Write difference to the file o.ppm") {|val| options[:output] = val}
13
13
  opts.on("-fov deg", String, "Field of view in degrees (0.1 to 89.9)") {|val| options[:fov] = val}
14
14
  opts.on("-threshold p", Integer, "#pixels p below which differences are ignored") {|val| options[:threshold] = val}
15
15
  opts.on("-gamma g", Float, "Value to convert rgb into linear space (default 2.2)") {|val| options[:gamma] = val}
16
16
  opts.on("-luminance l", Float, "White luminance (default 100.0 cdm^-2)") {|val| options[:luminance] = val}
17
- opts.on("-luminanceonly", "Only consider luminance; ignore chroma (color) in the comparison") {|val| options[:luminanceonly] = val}
18
- opts.on("-match_percentage", "Process pixel match in %") {|val| options[:match_percentage] = val}
17
+ opts.on("-luminanceonly", "Only consider luminance; ignore chroma (color) in the comparison") {|val| options[:luminanceonly] = nil}
18
+ opts.on("-match_percentage", "Process pixel match in %") {|val| options[:match_percentage] = nil}
19
19
 
20
20
  opts.parse!
21
21
  if ARGV.count == 2
22
22
  img1, img2 = ARGV
23
23
 
24
- match_percentage = options.delete :match_percentage
25
24
  rpdiff = RPDiff.new(img1, img2, options)
26
25
  rpdiff.diff
27
26
  else
data/lib/rpdiff.rb CHANGED
@@ -12,8 +12,8 @@ class RPDiff
12
12
  @pixel_difference = 0
13
13
 
14
14
  opts = "#{@img1} #{@img2} "
15
- @options.each {|k, v| opts << "-#{k} #{v}" if v }
16
- io = `perceptualdiff -verbose #{opts}`
15
+ @options.each {|k, v| opts << "-#{k} #{v} "}
16
+ io = `perceptualdiff #{opts}`
17
17
 
18
18
  io.split(/\n/).each do |line|
19
19
  @fov = $1 if line =~ /Field of view is (\d+\.\d+) degrees/
@@ -27,10 +27,6 @@ class RPDiff
27
27
  @incomparable = true if line =~ /FAIL: Images dimensions do not match/
28
28
  end
29
29
 
30
- if @options[:match_percentage]
31
- calculate_match_percentage
32
- end
33
-
34
30
  puts io
35
31
  end
36
32
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Benmergui
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-13 00:00:00.000000000 Z
11
+ date: 2015-04-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A thin wrapper on Perceptual Diff for ease of use.
14
14
  email: gabriel.benmergui@gmail.com
@@ -21,12 +21,13 @@ files:
21
21
  - bin/rpdiff
22
22
  - lib/rpdiff.rb
23
23
  homepage: http://github.com/conanbatt/rpdiff
24
- licenses: []
24
+ licenses:
25
+ - MIT
25
26
  metadata: {}
26
27
  post_install_message:
27
28
  rdoc_options: []
28
29
  require_paths:
29
- - - lib
30
+ - lib
30
31
  required_ruby_version: !ruby/object:Gem::Requirement
31
32
  requirements:
32
33
  - - ">="
@@ -39,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
40
  version: '0'
40
41
  requirements: []
41
42
  rubyforge_project:
42
- rubygems_version: 2.2.2
43
+ rubygems_version: 2.4.6
43
44
  signing_key:
44
45
  specification_version: 4
45
46
  summary: Rpdiff is a ruby wrapper on Perceptual diff