Skip to content

Commit b1a3a2c

Browse files
committed
Merge pull request libvips#29 from jechols/fix-tiff-writer
Fix tiff writer
2 parents 898ddf7 + cdde9e3 commit b1a3a2c

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@ ruby-vips-*.gem
22
.yardoc
33
.*.swp
44
tags
5+
6+
# Ignore compiler-generated files
7+
*.so
8+
*.o
9+
/Makefile
10+
/mkmf.log

lib/vips/writer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def compression_str
171171
end
172172

173173
def layout_str
174-
s = @layout
174+
s = @layout.to_s
175175
s << ":#{@tile_size.join 'x'}" if @layout == :tile
176176
s
177177
end

spec/vips/writer_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,10 @@
3131
@writer.class.should == VIPS::Writer
3232
@writer.image.should == @image
3333
end
34+
35+
it "should write a tiled TIFF" do
36+
@tiff_out = tmp('temp.tiff').to_s
37+
File.unlink(@tiff_out) if File.exists?(@tiff_out)
38+
@image.tiff(@tiff_out, :layout => :tile)
39+
end
3440
end

0 commit comments

Comments
 (0)