Module: PNG::Decode::InstanceMethods
- Defined in:
- lib/png-encode/decode.rb
Instance Method Summary collapse
Instance Method Details
#decode(outfile) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/png-encode/decode.rb', line 15 def decode(outfile) output = [] @data.pixels.each do |b| output << b end file = File.new(outfile, 'wb') file.write(output.pack("C#{output.size}")) return file end |