Sha256: 80fb3100233d00b6f0f5fb92fea0a4ecfa7be3396a7e95ad9e51e37d38cb130e
Contents?: true
Size: 711 Bytes
Versions: 12
Compression:
Stored size: 711 Bytes
Contents
#!/usr/bin/ruby require "vips" image = Vips::Image.black 1, 100000 image.set_progress true def progress_to_s(name, progress) puts "#{name}:" puts " progress.run = #{progress[:run]}" puts " progress.eta = #{progress[:eta]}" puts " progress.tpels = #{progress[:tpels]}" puts " progress.npels = #{progress[:npels]}" puts " progress.percent = #{progress[:percent]}" end image.signal_connect :preeval do |progress| progress_to_s("preeval", progress) end image.signal_connect :eval do |progress| progress_to_s("eval", progress) image.set_kill(true) if progress[:percent] > 50 end image.signal_connect :posteval do |progress| progress_to_s("posteval", progress) end image.avg
Version data entries
12 entries across 12 versions & 3 rubygems