tyler 0.0.3 → 0.1.0

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 (3) hide show
  1. data/bin/tyler +8 -0
  2. data/lib/tyler.rb +6 -2
  3. metadata +4 -4
data/bin/tyler ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+
4
+ raise "Requires two arguments <input image> and <output image>." unless ARGV.length == 2
5
+
6
+ require 'tyler'
7
+
8
+ Tyler::tile(ARGV[0]).write ARGV[1]
data/lib/tyler.rb CHANGED
@@ -6,11 +6,15 @@ class Tyler
6
6
  def tile file
7
7
  i = nil
8
8
 
9
- if Magick::Image === file
9
+ case file
10
+ when Magick::Image
10
11
  i = file
11
- else
12
+ when Magick::ImageList
13
+ when File, String
12
14
  l = Magick::ImageList.new file
13
15
  i = l[0]
16
+ else
17
+ i = Magick::Image.new file
14
18
  end
15
19
 
16
20
  x = i.columns
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 1
7
8
  - 0
8
- - 3
9
- version: 0.0.3
9
+ version: 0.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lyndon Maydwell
@@ -31,8 +31,8 @@ dependencies:
31
31
  version_requirements: *id001
32
32
  description: Allows easy generation of tiling textures, via files, or in memory!
33
33
  email: maydwell@gmail.com
34
- executables: []
35
-
34
+ executables:
35
+ - tyler
36
36
  extensions: []
37
37
 
38
38
  extra_rdoc_files: []