format_parser 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4af7a44806408b096543ba55fd7221b009c140766fc6dd27030bcd2fe09fa8e
4
- data.tar.gz: 26da12681820653b7e36caf755185de9ed838e7b81656490b1a8c26d47535699
3
+ metadata.gz: bdd060f6f792e1cf8247b53474deaccfd532a04501652f42e6e044945705b813
4
+ data.tar.gz: 85e23ed33775ec5424f6a8daa5a3bdaf4bd9347be983b10b740ec4283295abed
5
5
  SHA512:
6
- metadata.gz: 94fd6c621c5116f9ce4dcd6319a6ebc5ef5018d074f51b57222ae39e42b9d2c0a33bf08d17dbac28361da97315494094f84a9000a3094d9f6109058084797889
7
- data.tar.gz: b4805092400b37c33dd3fbf81c2404851386150e9e0d29682a66dd8feb4bc0205ccda29913954d1a4196ce47e935d2f818e92ae532837ada6db6fdadc5d6211b
6
+ metadata.gz: 553b087703215029a13a2b7e1070012f2509cebb6b2607957e75e6d44105b91b886a0efdd2b75e6af185fe124294eee7edd001d613d19022930701168d79e754
7
+ data.tar.gz: 93aa2c2d76b98d2c593d0bfd72e89601cab80af236d572afe1271c379e831b490c896c6517a72a7127a6547be4e577ad7af9413c7b46df4714f855201d9a5cf2
data/.gitignore CHANGED
@@ -1,13 +1,56 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
1
+ *.gem
2
+ *.rbc
3
+ /.config
5
4
  /coverage/
6
- /doc/
5
+ /InstalledFiles
7
6
  /pkg/
8
7
  /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
9
11
  /tmp/
10
- *.gem
11
12
 
12
- # rspec failure tracking
13
- .rspec_status
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ Gemfile.lock
49
+ .ruby-version
50
+ .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
54
+
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
@@ -1,8 +1,9 @@
1
1
  rvm:
2
- - 2.2.0
3
- - 2.4.6
4
- - 2.5.5
5
- - 2.6.3
2
+ - 2.2.10
3
+ - 2.3.8
4
+ - 2.4.9
5
+ - 2.5.7
6
+ - 2.6.5
6
7
  - jruby
7
8
  sudo: false
8
9
  cache: bundler
@@ -1,3 +1,7 @@
1
+ ## 0.19.0
2
+ * Improve handling of Sony ARW files (make sure the width/height is correctly recognized)
3
+ * Update Travis matrix and gitignore
4
+
1
5
  ## 0.18.0
2
6
  * Mark m4v as one of the filename extensions likely to parse via the MOOV parser
3
7
  * Adopt [Hippocratic license v. 1.2](https://firstdonoharm.dev/version/1/2/license.html)
data/README.md CHANGED
@@ -164,6 +164,9 @@ Unless specified otherwise in this section the fixture files are MIT licensed an
164
164
  - `Shinbutsureijoushuincho.tiff` is obtained from Wikimedia Commons and is Creative Commons licensed
165
165
  - `IMG_9266_*.tif` and all it's variations were created by the project maintainers
166
166
 
167
+ ### ARW
168
+ - ARW example is downloaded from http://www.rawsamples.ch/ and is Creative Common Licensed.
169
+
167
170
  ### ZIP
168
171
  - The .zip fixture files have been created by the project maintainers
169
172
 
@@ -1,3 +1,3 @@
1
1
  module FormatParser
2
- VERSION = '0.18.0'
2
+ VERSION = '0.19.0'
3
3
  end
@@ -22,8 +22,8 @@ class FormatParser::TIFFParser
22
22
  exif_data = exif_from_tiff_io(io)
23
23
  return unless exif_data
24
24
 
25
- w = exif_data.image_width
26
- h = exif_data.image_length
25
+ w = exif_data.width || exif_data.pixel_x_dimension
26
+ h = exif_data.height || exif_data.pixel_y_dimension
27
27
 
28
28
  FormatParser::Image.new(
29
29
  format: :tif,
@@ -47,6 +47,17 @@ describe FormatParser::TIFFParser do
47
47
  expect(parsed.intrinsics[:exif]).not_to be_nil
48
48
  end
49
49
 
50
+ it 'correctly extracts dimensions for a Sony ARW fixture' do
51
+ arw_path = fixtures_dir + '/ARW/RAW_SONY_ILCE-7RM2.ARW'
52
+
53
+ parsed = subject.call(File.open(arw_path, 'rb'))
54
+
55
+ expect(parsed).not_to be_nil
56
+ expect(parsed.width_px).to eq(7952)
57
+ expect(parsed.height_px).to eq(5304)
58
+ expect(parsed.intrinsics[:exif]).not_to be_nil
59
+ end
60
+
50
61
  describe 'correctly extracts dimensions from various TIFF flavors of the same file' do
51
62
  Dir.glob(fixtures_dir + '/TIFF/IMG_9266*.tif').each do |tiff_path|
52
63
  it "is able to parse #{File.basename(tiff_path)}" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: format_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Berman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-11-02 00:00:00.000000000 Z
12
+ date: 2019-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ks