easyimg_utils 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98a85bab76bed1f59c4a7d78a6e931bc6b6bd8661ff489259b2280e263d97d15
4
- data.tar.gz: 15c99048d0df0d559022b67bb64563d12c4baf2e0d15ce6a315c737a37f150f1
3
+ metadata.gz: 5f46e4a30a8cbcfe7166727983d2930d8690aa58060016d63cff168202f11987
4
+ data.tar.gz: e7ff3d14f9c73b6b7af227e5f76689c294ed512c38823fcc96c452f0f964bfe8
5
5
  SHA512:
6
- metadata.gz: f30f0721935c5d4aef4128504e7709f8b6ad539ba466410d428ce8326ca3e0195857ea16768f06e70839f084d4e92043012551106d6b09f001ea191689fc9e36
7
- data.tar.gz: b0f77a276d1f71d942a1b8bbe696ec51d4bfc8ec9cd8ea088a66c7eda62e87a7666d68b6c35dc8613706a38b797c2997f1ba140d4ee2c21cc9747598e6e7c494
6
+ metadata.gz: 599600135545dee8880298a4c6cb2703a7da4d87530197ad08162a87f8cfd1ab1a5401aed04ebe15788abb18dd800c356f49b8d4c3e670f4f76de7b06d3818d2
7
+ data.tar.gz: ac7d4e7737fa56b5d03a450ef3bb619f827080c5b89810dc6a5aa3ca56b7495e93746aa4e22d858f42690d8617537dc9d2630c027102870288578818b9de4dbc
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/easyimg_utils.rb CHANGED
@@ -383,20 +383,22 @@ class EasyImgUtils
383
383
 
384
384
  end
385
385
 
386
- # Currently the screencast has no options. It will capture the screen
387
- # every second for a duration of 6 seconds.
386
+ # Takes a screenshot every second to create an animated gif
388
387
  #
389
- def screencast()
388
+ def screencast(duration: 6, scale: 1, window: true)
390
389
 
391
390
  fileout = @file_out.sub(/\.\w+$/,'%d.png')
392
391
 
393
392
  puts 'fileout: ' + fileout if @debug
394
393
 
395
394
  x4ss = X4ss.new fileout, mouse: true, window: true
396
- sleep 2; x4ss.record # then go to the target window, wait 2 seconds and go
395
+ mode = window ? :window : :screen
396
+ sleep 2; x4ss.record duration: duration, mode: mode
397
397
  x4ss.save
398
398
 
399
- EasyImgUtils.new(fileout, @file_out).animate
399
+ fileout2 = fileout.sub(/(?=%)/,'b')
400
+ EasyImgUtils.new(fileout, fileout2).scale(scale) unless scale == 1
401
+ EasyImgUtils.new(fileout2, @file_out).animate
400
402
 
401
403
  end
402
404
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easyimg_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file