touchy 0.0.6 → 0.0.7
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.
- data/bin/touchy +6 -6
- data/lib/touchy/version.rb +1 -1
- data/lib/touchy.rb +1 -1
- metadata +1 -1
data/bin/touchy
CHANGED
@@ -4,11 +4,11 @@ $:.unshift Pathname.new(__FILE__).realpath.join('../../lib') if $0 == __FILE__
|
|
4
4
|
require 'thor'
|
5
5
|
require "touchy"
|
6
6
|
|
7
|
-
module
|
7
|
+
module Touchy
|
8
8
|
class Command < Thor
|
9
9
|
desc "odd", "search odd size images"
|
10
10
|
def odd(*path)
|
11
|
-
found =
|
11
|
+
found = Touchy.find_odd_size_images(path)
|
12
12
|
|
13
13
|
found.each do |path|
|
14
14
|
puts path
|
@@ -18,21 +18,21 @@ module touchy
|
|
18
18
|
|
19
19
|
desc "fix", "fix image's size to even"
|
20
20
|
def fix(*path)
|
21
|
-
found =
|
21
|
+
found = Touchy.find_odd_size_images(path)
|
22
22
|
|
23
23
|
found.each do |path|
|
24
24
|
image = Magick::Image.read(path).first
|
25
|
-
new_image =
|
25
|
+
new_image = Touchy.extend_size_to_odd image
|
26
26
|
new_image.write(path)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
30
|
desc "create_test_image", "create test image"
|
31
31
|
def create_test_image(x, y, name)
|
32
|
-
image =
|
32
|
+
image = Touchy.create_transparent_image x.to_i, y.to_i
|
33
33
|
image.write(name)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
|
38
|
+
Touchy::Command.start
|
data/lib/touchy/version.rb
CHANGED
data/lib/touchy.rb
CHANGED