morandi 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/morandi/image_processor.rb +3 -1
- data/lib/morandi/redeye.rb +3 -1
- data/lib/morandi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2a0a48b129d2fe7d5d8361db30ba55bda9fb418
|
4
|
+
data.tar.gz: 0ae3a78f267c491b8527f332ce78f84e07e83a3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50e18d5e936fffbf868bf4b9f564a116cf5b2088c86356bb06a0abfbea05ee4c0b24c38cc7a796152854326f75e5a1d41b0adf5155005228e46b2e30d44928e6
|
7
|
+
data.tar.gz: 81764fb280916e57c6d722eb3a6b25d4ae417e3dbe8f91820de66a14c3b3b6d81013f75a85308c9df260c66a7eb44761e297d488c3959917e31140cefd230af5
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'morandi/profiled_pixbuf'
|
2
|
+
require 'morandi/redeye'
|
2
3
|
|
3
4
|
class Morandi::ImageProcessor
|
4
5
|
attr_reader :options, :pb
|
@@ -24,6 +25,7 @@ class Morandi::ImageProcessor
|
|
24
25
|
get_pixbuf
|
25
26
|
elsif @file.is_a?(Gdk::Pixbuf) or @file.is_a?(Morandi::ProfiledPixbuf)
|
26
27
|
@pb = @file
|
28
|
+
@scale = 1.0
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
@@ -134,7 +136,7 @@ protected
|
|
134
136
|
|
135
137
|
def apply_redeye!
|
136
138
|
for eye in options['redeye'] || []
|
137
|
-
@pb = Morandi::RedEye.tap_on(@pb, eye[0] * @scale, eye[1] * @scale)
|
139
|
+
@pb = Morandi::RedEye::TapRedEye.tap_on(@pb, eye[0] * @scale, eye[1] * @scale)
|
138
140
|
end
|
139
141
|
end
|
140
142
|
|
data/lib/morandi/redeye.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'redeye'
|
2
|
+
|
1
3
|
module Morandi
|
2
4
|
module RedEye
|
3
5
|
module TapRedEye
|
@@ -9,7 +11,7 @@ module TapRedEye
|
|
9
11
|
y1 = [y - n, 0].max
|
10
12
|
y2 = [y + n, pb.height].min
|
11
13
|
return pb unless (x1 >= 0) && (x2 > x1) && (y1 >= 0) && (y2 > y1)
|
12
|
-
redeye = RedEye.new(pb, x1, y1, x2, y2)
|
14
|
+
redeye = ::RedEye.new(pb, x1, y1, x2, y2)
|
13
15
|
|
14
16
|
sensitivity = 2
|
15
17
|
blobs = redeye.identify_blobs(sensitivity).reject { |i|
|
data/lib/morandi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: morandi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- |+
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-12-
|
14
|
+
date: 2015-12-10 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: gtk2
|