ruby-dzi 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/lib/ruby_dzi.rb +3 -3
- data/ruby-dzi.gemspec +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
@@ -2,12 +2,12 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('ruby-dzi', '0.1.
|
5
|
+
Echoe.new('ruby-dzi', '0.1.2') do |p|
|
6
6
|
p.description = "Ruby Dzi slices images into several tiles and creates dzi descriptor file."
|
7
7
|
p.url = "http://github.com/netxph/ruby-dzi"
|
8
8
|
p.author = "Marc Vitalis"
|
9
9
|
p.email = "marc.vitalis@live.com"
|
10
|
-
p.ignore_pattern = ["*.jpg", "*_files/**/**", "test.rb", "*.dzi", "pkg"]
|
10
|
+
p.ignore_pattern = ["*.jpg", "*_files/**/**", "test.rb", "*.dzi", "pkg/*", "pkg/**/**"]
|
11
11
|
p.development_dependencies = ["rmagick"]
|
12
12
|
end
|
13
13
|
|
data/lib/ruby_dzi.rb
CHANGED
@@ -44,7 +44,7 @@ class RubyDzi
|
|
44
44
|
@format = format
|
45
45
|
|
46
46
|
@levels_root_dir = File.join(@dir, @name + '_files')
|
47
|
-
@xml_descriptor_path = File.join(@dir, @name + '.
|
47
|
+
@xml_descriptor_path = File.join(@dir, @name + '.' + @output_ext)
|
48
48
|
|
49
49
|
image = get_image(@image_path)
|
50
50
|
|
@@ -68,7 +68,7 @@ class RubyDzi
|
|
68
68
|
# iterate over rows
|
69
69
|
y, row_count = 0, 0
|
70
70
|
while y < height
|
71
|
-
dest_path = File.join(current_level_dir, "#{col_count}_#{row_count}.#{@
|
71
|
+
dest_path = File.join(current_level_dir, "#{col_count}_#{row_count}.#{@format}")
|
72
72
|
tile_width, tile_height = tile_dimensions(x, y, @tile_size, @overlap)
|
73
73
|
|
74
74
|
save_cropped_image(image, dest_path, x, y, tile_width, tile_height, @quality)
|
@@ -87,7 +87,7 @@ class RubyDzi
|
|
87
87
|
write_xml_descriptor(@xml_descriptor_path,
|
88
88
|
:tile_size => @tile_size,
|
89
89
|
:overlap => @overlap,
|
90
|
-
:format => @
|
90
|
+
:format => @format,
|
91
91
|
:width => orig_width,
|
92
92
|
:height => orig_height)
|
93
93
|
end
|
data/ruby-dzi.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-dzi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Marc Vitalis
|