panomosity 0.1.40 → 0.1.41

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: 508c47f3caa59487c8e85f4787044dd174b9e43a63fce0ee0ecfc210c88ecef7
4
- data.tar.gz: d7e9a8a263379d90f984746e0b3f2215943322418c59ce4f9f25012563fbce82
3
+ metadata.gz: 43cc742ee7f3a7e491f8e2ffe3a2f47096c649949e4c9a7cc144c7a2baea819c
4
+ data.tar.gz: 2754ed973a428206f5d2fa4a2327a77fa43a5fedb7151be499f7aaa029d0ca50
5
5
  SHA512:
6
- metadata.gz: 73a953315be6abba6b26a8371dbf5f0ad131fbae1733b59c12e243d6e31e531a2b9bf3e908b2d5b5d03423ef3006347dd15be55dafcd38c019735e57ea998ad4
7
- data.tar.gz: 380b7ac01f1306116cbdc2c5982760f2495ca107321a6564bfca266b449e6c631ec8752b40228e12b8ffb8127f8f3305c3451a93a5ba2a084a91f3bd838ad30d
6
+ metadata.gz: b1a7250d3b3c71680547decb6062086889c5dc60b03ba32a0bff7331264696fb435131fb9239a8b9c37e0aec0e90e6e5dcc56156eb2b7424ec7013cbe364928d
7
+ data.tar.gz: f430213bf4698399eae2607930ba443c529da150df03034f2e3100e68a45d43d18d228a8e64fc74f63561518a89e26db04b653d9a0e751de70a38c059f887c38
@@ -230,12 +230,19 @@ module Panomosity
230
230
  logger.debug "cropping to #{percent}%"
231
231
  unless @options[:without_cropping]
232
232
  images = Image.parse(@input_file)
233
- images.each do |image|
233
+
234
+ crop_center_commands = images.map do |image|
234
235
  width_offset = (image.w.to_f * (1 - scale_factor) / 2).round
235
236
  height_offset = (image.h.to_f * (1 - scale_factor) / 2).round
236
237
  logger.debug "cropping #{image.name}"
237
- `convert #{image.name} -crop "#{percent}%x#{percent}%+#{width_offset}+#{height_offset}" #{image.name}`
238
+
239
+ "convert #{image.name} -crop '#{percent}%x#{percent}%+#{width_offset}+#{height_offset}' #{image.name}"
238
240
  end
241
+
242
+ crop_centers_command = crop_center_commands.join("\n")
243
+ parallel_command = "cat <<'EOF' | parallel \n%s\nEOF"
244
+ crop_centers_command = parallel_command % crop_centers_command
245
+ `#{crop_centers_command}`
239
246
  end
240
247
 
241
248
  # Since all images have been cropped, we need to change d,e params to move images based on how much was cropped
@@ -641,6 +648,7 @@ module Panomosity
641
648
  save_file
642
649
  logger.debug "running nona #{@output}"
643
650
  output = "nona --save-intermediate-images --intermediate-suffix=intermediate -v -m TIFF_m --seam=blend #{@output} -o #{res}_res_stitch_section_c#{column.to_s.rjust(5, '0')}_"
651
+ # output = "nona-mask #@output -m TIFF_m -o #{res}_res_stitch_section_c#{column.to_s.rjust(5, '0')}_"
644
652
  logger.debug output
645
653
  output
646
654
  end
@@ -1,3 +1,3 @@
1
1
  module Panomosity
2
- VERSION = '0.1.40'
2
+ VERSION = '0.1.41'
3
3
  end
@@ -6,7 +6,7 @@ require 'panomosity/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'panomosity'
8
8
  spec.version = Panomosity::VERSION
9
- spec.authors = ['Oliver Garcia']
9
+ spec.authors = ['Oliver Garcia', 'Joshua Stowers']
10
10
  spec.email = ['ogarci5@gmail.com']
11
11
 
12
12
  spec.summary = %q{Wrapper for the PTO file parsing needed for PanoTools.}
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panomosity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.40
4
+ version: 0.1.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Garcia
8
+ - Joshua Stowers
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2020-10-01 00:00:00.000000000 Z
12
+ date: 2020-10-30 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler