Sha256: cd364e05ffad638f35dc9d52b6d9c65020b30d80267bc4c687e3afbde30226c5
Contents?: true
Size: 687 Bytes
Versions: 1
Compression:
Stored size: 687 Bytes
Contents
require File.expand_path('../spec_helper.rb', File.dirname(__FILE__)) describe ChunkyPNG::Image do it "should write a valid PNG image using an indexed palette" do image = ChunkyPNG::Image.new(10, 20, ChunkyPNG::Color.rgb(10, 100, 255)) filename = resource_file('testing.png') File.open(filename, 'w') { |f| image.write(f) } png = ChunkyPNG.load(filename) png.header_chunk.width.should == 10 png.header_chunk.height.should == 20 png.header_chunk.color.should == ChunkyPNG::Chunk::Header::COLOR_INDEXED png.palette_chunk.should_not be_nil png.data_chunks.should_not be_empty # `open #{filename}` File.unlink(filename) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chunky_png-0.0.1 | spec/integration/image_spec.rb |