Sha256: 65d183244e4d17c0fe7a31c623587e369addeaf757df0523fdcef442357f7718

Contents?: true

Size: 683 Bytes

Versions: 16

Compression:

Stored size: 683 Bytes

Contents

require 'spec_helper'

begin
  require 'chunky_png/rmagick'

  describe ChunkyPNG::RMagick do
  
    it "should import an image from RMagick correctly" do
      image = Magick::Image.read(resource_file('16x16_non_interlaced.png')).first
      canvas = ChunkyPNG::RMagick.import(image)
      canvas.should == reference_canvas('16x16_non_interlaced')
    end
  
    it "should export an image to RMagick correctly" do
      canvas = reference_canvas('16x16_non_interlaced')
      image  = ChunkyPNG::RMagick.export(canvas)
      image.format = 'PNG32'
      canvas.should == ChunkyPNG::Canvas.from_blob(image.to_blob)
    end
  end
rescue LoadError => e
  # skipping RMagick tests
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
chunky_png-0.10.5 spec/chunky_png/rmagick_spec.rb
chunky_png-0.10.4 spec/chunky_png/rmagick_spec.rb
chunky_png-0.10.3 spec/chunky_png/rmagick_spec.rb
chunky_png-0.10.2 spec/chunky_png/rmagick_spec.rb
chunky_png-0.10.1 spec/chunky_png/rmagick_spec.rb
chunky_png-0.10.0 spec/chunky_png/rmagick_spec.rb
chunky_png-0.9.2 spec/chunky_png/rmagick_spec.rb
chunky_png-0.9.1 spec/chunky_png/rmagick_spec.rb
chunky_png-0.9.0 spec/chunky_png/rmagick_spec.rb
chunky_png-0.8.0 spec/chunky_png/rmagick_spec.rb
chunky_png-0.7.3 spec/chunky_png/rmagick_spec.rb
chunky_png-0.7.1 spec/chunky_png/rmagick_spec.rb
chunky_png-0.7.0 spec/chunky_png/rmagick_spec.rb
chunky_png-0.6.0 spec/chunky_png/rmagick_spec.rb
chunky_png-0.5.8 spec/chunky_png/rmagick_spec.rb
chunky_png-0.5.7 spec/chunky_png/rmagick_spec.rb