Sha256: 3467797ef6d38bc187e59969b0738c34e3126a4b2b5de0bab683bbefe4e2d5f2

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 KB

Contents

require File.expand_path('../spec_helper.rb', File.dirname(__FILE__))

describe ChunkyPNG do
  
  # it "should create reference images for all color modes" do
  #   image    = ChunkyPNG::Image.new(10, 10, ChunkyPNG::Pixel.rgb(100, 100, 100))
  #   [:indexed, :grayscale, :grayscale_alpha, :truecolor, :truecolor_alpha].each do |color_mode|
  #     
  #     color_mode_id = ChunkyPNG::Chunk::Header.const_get("COLOR_#{color_mode.to_s.upcase}")
  #     filename = resource_file("gray_10x10_#{color_mode}.png")
  #     image.save(filename, :color_mode => color_mode_id)
  #   end
  # end
  
  # it "should create a reference image for operations" do
  #   image = ChunkyPNG::Image.new(16, 16, ChunkyPNG::Pixel::WHITE)
  #   r = 0
  #   image.width.times do |x|
  #     g = 0
  #     image.height.times do |y|
  #       image[x, y] = ChunkyPNG::Pixel.rgb(r, g, 255)
  #       g += 16
  #     end
  #     r += 16
  #   end
  #   filename = resource_file('operations.png')
  #   image.save(filename)
  #   # `open #{filename}`
  # end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chunky_png-0.0.5 spec/integration/image_spec.rb
chunky_png-0.0.4 spec/integration/image_spec.rb