Sha256: a824eb9a4b3eced2a9c96763633f3ca7f894fa94f45965250d6ed01daa601020
Contents?: true
Size: 602 Bytes
Versions: 12
Compression:
Stored size: 602 Bytes
Contents
require 'spec_helper' describe ChunkyPNG::Canvas do describe '#to_data_url' do it "should export a sample canvas to an RGBA stream correctly" do canvas = ChunkyPNG::Canvas.new(2, 2, [ChunkyPNG::Color.rgba(1,2,3,4), ChunkyPNG::Color.rgba(5,6,7,8), ChunkyPNG::Color.rgba(4,3,2,1), ChunkyPNG::Color.rgba(8,7,6,5)]) expect(canvas.to_data_url).to eql "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACAgMAAAAP2OW3AAAADFBMVEUBAgMEAwIFBgcIBwazgAAdAAAABHRSTlMEAQgFhYDlfQAAAAxJREFUeJxjUmAKAAAAwAB1GNhIEwAAAABJRU5ErkJggg==" end end end
Version data entries
12 entries across 11 versions & 3 rubygems