Sha256: 9fbaab3d8e94959e9530ebcd58075f6dfadd5205ee19029bd79a0e8e907847f0

Contents?: true

Size: 354 Bytes

Versions: 1

Compression:

Stored size: 354 Bytes

Contents

require 'benchmark'
require 'pp'
require 'psd'

file = ARGV[0] || '/Users/ryanlefevre/LayerVault/Turtleworks/Directory Page.psd'

results = Benchmark.measure "Image exporting" do
  psd = PSD.new(file)
  psd.parse!

  comp = psd.layer_comps[1]
  psd.tree.filter_by_comp(comp[:id]).save_as_png('./output.png')
end

puts Benchmark::CAPTION
puts results.to_s

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bench9000-0.1 vendor/psd.rb/examples/build_image.rb