mini_exiftool 2.10.0 → 2.10.1

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: 29f066192f7a6aa306be4a975177eb121f1f36ae54657bce8fba3eb03d3b6b4b
4
- data.tar.gz: 19c32968ea26a447921d9c964e365a38c8d46bee90b85aadcd1886b7ffae9364
3
+ metadata.gz: 7904a6f99bcb35d5b5d0c98cb23dfe671a8cda1d2dd61e57140fdb1c8fb17012
4
+ data.tar.gz: '074899234f52fc1a42c854d5f20e373cf2970cbe186854b1bf4d51133224bddb'
5
5
  SHA512:
6
- metadata.gz: 878d604908cc91deec045336c011520e4647e4c66f5d85ed1089b2daae8d1a04cdbc9c6c3e60bdbc0906f8878680fe5d18c81a73ce350ba05087ba1cdf3b9ce2
7
- data.tar.gz: b3461aaececc3c7a4e5dd57160300eee2fa6a027d6fd976bc9328ef4bcf3673e5e7615fa2d556caa1e37474c9de8a920054927eaedb61a5a785b511e2b2e44a6
6
+ metadata.gz: 7409a45bf6b8bbf40eb79a288532c8019c5e14d6114e6adc1fdd2226270d9480cef568393c245595fcb1babb0f46ef840e81829813ffe16a5089c3158e2ffec6
7
+ data.tar.gz: 4b2aa1e104d586d102a2ca2602621ad9418373308824598d5b01ce98c286988809a13cc758538c2bafacdde0fd4c2aec2c23c3b8b09f493172deccb538590464
data/.aspell.pws CHANGED
@@ -1,4 +1,4 @@
1
- personal_ws-1.1 en 118
1
+ personal_ws-1.1 en 119
2
2
  Barushev
3
3
  Bugfix
4
4
  CaptionAbstract
@@ -81,6 +81,7 @@ io
81
81
  iptc
82
82
  jpg
83
83
  json
84
+ jvradelis
84
85
  md
85
86
  metadata
86
87
  mfo
data/Changelog CHANGED
@@ -1,3 +1,9 @@
1
+ 2.10.1
2
+ - Make access via PStore thread-safe.
3
+ - Fix conversion of values with leading zeros.
4
+ Thanks to jvradelis for reporting this bug (github issue #40) and the hint
5
+ to the incorrect regular expression.
6
+
1
7
  2.10.0
2
8
  - Implement the method MiniExiftool#respond_to_missing? for completeness and
3
9
  the possibility to use MiniExiftool with Forwardable.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # MiniExiftool [![Build Status](https://travis-ci.org/janfri/mini_exiftool.svg?branch=master)](https://travis-ci.org/janfri/mini_exiftool)
2
2
 
3
3
  This library is a wrapper for the ExifTool command-line application
4
- (http://www.sno.phy.queensu.ca/~phil/exiftool) written by Phil Harvey.
4
+ (https://exiftool.org) written by Phil Harvey.
5
5
  It provides the full power of ExifTool to Ruby: reading and writing of
6
6
  EXIF-data, IPTC-data and XMP-data.
7
7
 
@@ -12,7 +12,7 @@ command-line application at least version 7.65.
12
12
  If you run on Ruby 1.8 or with a prior exiftool version
13
13
  install mini_exiftool version 1.x.x.
14
14
  Instructions for installation you can find under
15
- http://www.sno.phy.queensu.ca/~phil/exiftool/install.html .
15
+ https://exiftool.org/install.html .
16
16
 
17
17
  Alternatively Wil Gieseler has bundled a meta-gem that eliminates the
18
18
  need for a separate ExifTool installation. Have a look at
@@ -131,7 +131,7 @@ tag.
131
131
 
132
132
  Please read the section about the character sets of the ExifTool command
133
133
  line application carefully to understand what's going on
134
- (http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html#Q10)!
134
+ (https://exiftool.org/faq.html#Q10)!
135
135
 
136
136
  ```ruby
137
137
  # Using UTF-8 as internal encoding for IPTC tags and MacRoman
data/Rakefile CHANGED
@@ -10,10 +10,10 @@ Rim.setup do |p|
10
10
  p.version = MiniExiftool::VERSION
11
11
  p.authors = 'Jan Friedrich'
12
12
  p.email = 'janfri26@gmail.com'
13
- p.summary = 'This library is a wrapper for the ExifTool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool).'
13
+ p.summary = 'This library is a wrapper for the ExifTool command-line application (https://exiftool.org).'
14
14
  p.description <<-END
15
15
  This library is a wrapper for the ExifTool command-line application
16
- (http://www.sno.phy.queensu.ca/~phil/exiftool) written by Phil Harvey.
16
+ (https://exiftool.org) written by Phil Harvey.
17
17
  It provides the full power of ExifTool to Ruby: reading and writing of
18
18
  EXIF-data, IPTC-data and XMP-data.
19
19
  END
@@ -26,7 +26,7 @@ EXIF-data, IPTC-data and XMP-data.
26
26
  | Please ensure you have installed exiftool at least version 7.65 |
27
27
  | and it's found in your PATH (Try "exiftool -ver" on your commandline).|
28
28
  | For more details see |
29
- | http://www.sno.phy.queensu.ca/~phil/exiftool/install.html |
29
+ | https://exiftool.org/install.html |
30
30
  | You need also Ruby 1.9 or higher. |
31
31
  | If you need support for Ruby 1.8 or exiftool prior 7.65 install |
32
32
  | mini_exiftool version < 2.0.0. |
data/Tutorial.md CHANGED
@@ -4,7 +4,7 @@
4
4
  ## Installation
5
5
 
6
6
  * Installing the ExifTool command-line application from Phil Harvey
7
- (see http://www.sno.phy.queensu.ca/~phil/exiftool/install.html)
7
+ (see https://exiftool.org/install.html)
8
8
  * Installing the Ruby library (`gem install mini_exiftool`)
9
9
 
10
10
 
data/lib/mini_exiftool.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # MiniExiftool
4
4
  #
5
5
  # This library is wrapper for the ExifTool command-line
6
- # application (http://www.sno.phy.queensu.ca/~phil/exiftool/)
6
+ # application (https://exiftool.org/)
7
7
  # written by Phil Harvey.
8
8
  # Read and write access is done in a clean OO manner.
9
9
  #
@@ -26,7 +26,7 @@ require 'time'
26
26
  # Simple OO access to the ExifTool command-line application.
27
27
  class MiniExiftool
28
28
 
29
- VERSION = '2.10.0'
29
+ VERSION = '2.10.1'
30
30
 
31
31
  # Name of the ExifTool command-line application
32
32
  @@cmd = 'exiftool'
@@ -461,8 +461,8 @@ class MiniExiftool
461
461
  end
462
462
  when /^\+\d+\.\d+$/
463
463
  value = value.to_f
464
- when /^0+[1-9]+$/
465
- # nothing => String
464
+ when /^0\d+$/
465
+ # no conversion => String
466
466
  when /^-?\d+$/
467
467
  value = value.to_i
468
468
  when %r(^(\d+)/(\d+)$)
@@ -508,7 +508,7 @@ class MiniExiftool
508
508
  def self.load_or_create_pstore
509
509
  FileUtils.mkdir_p(pstore_dir)
510
510
  pstore_filename = File.join(pstore_dir, 'exiftool_tags_' << exiftool_version.gsub('.', '_') << '.pstore')
511
- @@pstore = PStore.new pstore_filename
511
+ @@pstore = PStore.new(pstore_filename, _threadsafe = true)
512
512
  if !File.exist?(pstore_filename) || File.size(pstore_filename) == 0
513
513
  $stderr.puts 'Generating cache file for ExifTool tag names. This takes a few seconds but is only needed once...'
514
514
  @@pstore.transaction do |ps|
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: mini_exiftool 2.10.0 ruby lib
2
+ # stub: mini_exiftool 2.10.1 ruby lib
3
3
  #
4
4
  # This file is automatically generated by rim.
5
5
  # PLEASE DO NOT EDIT IT DIRECTLY!
@@ -7,20 +7,20 @@
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "mini_exiftool"
10
- s.version = "2.10.0"
10
+ s.version = "2.10.1"
11
11
 
12
12
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
13
13
  s.require_paths = ["lib"]
14
14
  s.authors = ["Jan Friedrich"]
15
- s.date = "2020-01-01"
16
- s.description = "This library is a wrapper for the ExifTool command-line application\n(http://www.sno.phy.queensu.ca/~phil/exiftool) written by Phil Harvey.\nIt provides the full power of ExifTool to Ruby: reading and writing of\nEXIF-data, IPTC-data and XMP-data.\n"
15
+ s.date = "2021-05-15"
16
+ s.description = "This library is a wrapper for the ExifTool command-line application\n(https://exiftool.org) written by Phil Harvey.\nIt provides the full power of ExifTool to Ruby: reading and writing of\nEXIF-data, IPTC-data and XMP-data.\n"
17
17
  s.email = "janfri26@gmail.com"
18
18
  s.files = ["./.aspell.pws", "COPYING", "Changelog", "Gemfile", "README.md", "Rakefile", "Tutorial.md", "examples/copy_icc_profile.rb", "examples/external_photo.rb", "examples/print_portraits.rb", "examples/shift_time.rb", "examples/show_speedup_with_fast_option.rb", "lib/mini_exiftool.rb", "mini_exiftool.gemspec", "regtest/read_all.rb", "regtest/read_all.yml", "test/data", "test/data/Bad_PreviewIFD.jpg", "test/data/Canon.jpg", "test/data/INFORMATION", "test/data/invalid_byte_sequence_in_utf8.json", "test/data/invalid_rational.json", "test/data/test.jpg", "test/data/test.jpg.json", "test/data/test_coordinates.jpg", "test/data/test_encodings.jpg", "test/data/test_special_dates.jpg", "test/helpers_for_test.rb", "test/test_bad_preview_ifd.rb", "test/test_class_methods.rb", "test/test_composite.rb", "test/test_copy_tags_from.rb", "test/test_dumping.rb", "test/test_encodings.rb", "test/test_filename_access.rb", "test/test_from_hash.rb", "test/test_instance_methods.rb", "test/test_invalid_byte_sequence_in_utf8.rb", "test/test_invalid_rational.rb", "test/test_io.rb", "test/test_pstore.rb", "test/test_read.rb", "test/test_read_coordinates.rb", "test/test_read_numerical.rb", "test/test_save.rb", "test/test_special.rb", "test/test_special_dates.rb", "test/test_write.rb"]
19
19
  s.homepage = "https://github.com/janfri/mini_exiftool"
20
20
  s.licenses = ["LGPL-2.1"]
21
- s.post_install_message = "+-----------------------------------------------------------------------+\n| Please ensure you have installed exiftool at least version 7.65 |\n| and it's found in your PATH (Try \"exiftool -ver\" on your commandline).|\n| For more details see |\n| http://www.sno.phy.queensu.ca/~phil/exiftool/install.html |\n| You need also Ruby 1.9 or higher. |\n| If you need support for Ruby 1.8 or exiftool prior 7.65 install |\n| mini_exiftool version < 2.0.0. |\n+-----------------------------------------------------------------------+\n"
21
+ s.post_install_message = "+-----------------------------------------------------------------------+\n| Please ensure you have installed exiftool at least version 7.65 |\n| and it's found in your PATH (Try \"exiftool -ver\" on your commandline).|\n| For more details see |\n| https://exiftool.org/install.html |\n| You need also Ruby 1.9 or higher. |\n| If you need support for Ruby 1.8 or exiftool prior 7.65 install |\n| mini_exiftool version < 2.0.0. |\n+-----------------------------------------------------------------------+\n"
22
22
  s.rubygems_version = "3.1.2"
23
- s.summary = "This library is a wrapper for the ExifTool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool)."
23
+ s.summary = "This library is a wrapper for the ExifTool command-line application (https://exiftool.org)."
24
24
 
25
25
  if s.respond_to? :specification_version then
26
26
  s.specification_version = 4
data/regtest/read_all.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  sample: read Bad_PreviewIFD.jpg
3
3
  result:
4
- ExifToolVersion: 10.55
4
+ ExifToolVersion: 11.7
5
5
  FileSize: 8.4 kB
6
6
  FileType: JPEG
7
7
  FileTypeExtension: jpg
@@ -41,7 +41,7 @@ result:
41
41
  WB_RBLevels: 56833 21761 1 1
42
42
  ProgramShift: 0
43
43
  ExposureDifference: 0
44
- Warning: Bad PreviewIFD directory
44
+ Warning: "[minor] Bad PreviewIFD directory"
45
45
  ISOSetting: 110
46
46
  ImageBoundary: 0 0 3872 2592
47
47
  CropHiSpeed: Off (3904x2616 cropped to 3904x2616 at pixel 0,0)
@@ -84,6 +84,7 @@ result:
84
84
  MCUVersion: 146
85
85
  EffectiveMaxAperture: 4.0
86
86
  SensorPixelSize: 6.05 x 6.05 um
87
+ DateStampMode: 'Off'
87
88
  RetouchHistory: None
88
89
  ImageDataSize: 4725881
89
90
  ShutterCount: 290
@@ -122,7 +123,7 @@ result:
122
123
  RatingPercent: 0
123
124
  Rating: 0
124
125
  Title: ''
125
- ProfileCMMType: Lino
126
+ ProfileCMMType: Linotronic
126
127
  ProfileVersion: 2.1.0
127
128
  ProfileClass: Display Device Profile
128
129
  ColorSpaceData: 'RGB '
@@ -131,12 +132,12 @@ result:
131
132
  ProfileFileSignature: acsp
132
133
  PrimaryPlatform: Microsoft Corporation
133
134
  CMMFlags: Not Embedded, Independent
134
- DeviceManufacturer: 'IEC '
135
+ DeviceManufacturer: Hewlett-Packard
135
136
  DeviceModel: sRGB
136
137
  DeviceAttributes: Reflective, Glossy, Positive, Color
137
138
  RenderingIntent: Perceptual
138
139
  ConnectionSpaceIlluminant: 0.9642 1 0.82491
139
- ProfileCreator: 'HP '
140
+ ProfileCreator: Hewlett-Packard
140
141
  ProfileID: 0
141
142
  ProfileCopyright: Copyright (c) 1998 Hewlett-Packard Company
142
143
  ProfileDescription: sRGB IEC61966-2.1
@@ -170,8 +171,6 @@ result:
170
171
  Aperture: 5.6
171
172
  BlueBalance: 7
172
173
  ImageSize: 1x1
173
- LensID: AF-S DX VR Zoom-Nikkor 55-200mm f/4-5.6G IF-ED
174
- LensSpec: 55-200mm f/4-5.6 G VR
175
174
  Megapixels: 1.0e-06
176
175
  RedBalance: 56833
177
176
  ShutterSpeed: !ruby/object:Rational
@@ -181,12 +180,14 @@ result:
181
180
  SubSecDateTimeOriginal: 2008-12-12 11:12:30.000000000 +01:00
182
181
  SubSecModifyDate: 2012-05-31 21:33:12.000000000 +02:00
183
182
  ThumbnailImage: "(Binary data 631 bytes, use -b option to extract)"
183
+ LensID: AF-S DX VR Zoom-Nikkor 55-200mm f/4-5.6G IF-ED
184
+ LensSpec: 55-200mm f/4-5.6 G VR
184
185
  FocalLength35efl: 55.0 mm
185
186
  LightValue: 11.8
186
187
  ---
187
188
  sample: read Canon.jpg
188
189
  result:
189
- ExifToolVersion: 10.55
190
+ ExifToolVersion: 11.7
190
191
  FileSize: 2.6 kB
191
192
  FileType: JPEG
192
193
  FileTypeExtension: jpg
@@ -324,29 +325,29 @@ result:
324
325
  BitsPerSample: 8
325
326
  ColorComponents: 3
326
327
  YCbCrSubSampling: YCbCr4:2:0 (2 2)
327
- Aperture: 14.0
328
328
  DriveMode: Continuous Shooting
329
- ImageSize: 8x8
330
329
  Lens: 18.0 - 55.0 mm
330
+ ShootingMode: Bulb
331
+ WB_RGGBLevels: 1719 832 831 990
332
+ Aperture: 14.0
333
+ BlueBalance: 1.190619
334
+ ImageSize: 8x8
331
335
  LensID: Unknown 18-55mm
332
336
  Megapixels: 6.4e-05
337
+ RedBalance: 2.067348
333
338
  ScaleFactor35efl: 1.6
334
- ShootingMode: Bulb
335
339
  ShutterSpeed: 4
336
- WB_RGGBLevels: 1719 832 831 990
337
- BlueBalance: 1.190619
340
+ Lens35efl: '18.0 - 55.0 mm (35 mm equivalent: 28.6 - 87.4 mm)'
338
341
  CircleOfConfusion: 0.019 mm
339
342
  DOF: inf (4.31 m - inf)
340
343
  FOV: 36.9 deg
341
344
  FocalLength35efl: '34.0 mm (35 mm equivalent: 54.0 mm)'
342
345
  HyperfocalDistance: 4.37 m
343
- Lens35efl: '18.0 - 55.0 mm (35 mm equivalent: 28.6 - 87.4 mm)'
344
346
  LightValue: 5.6
345
- RedBalance: 2.067348
346
347
  ---
347
348
  sample: read test.jpg
348
349
  result:
349
- ExifToolVersion: 10.55
350
+ ExifToolVersion: 11.7
350
351
  FileSize: 46 kB
351
352
  FileType: JPEG
352
353
  FileTypeExtension: jpg
@@ -406,7 +407,7 @@ result:
406
407
  ImageStabilization: 'On'
407
408
  ZoneMatching: ISO Setting Used
408
409
  ColorTemperature: 0
409
- LensType: Minolta AF 28-135mm F4-4.5 or Sigma Lens
410
+ LensType: Minolta AF 28-135mm F4-4.5 or Other Lens
410
411
  UserComment: ''
411
412
  FlashpixVersion: 100
412
413
  ColorSpace: sRGB
@@ -441,7 +442,7 @@ result:
441
442
  YCbCrSubSampling: YCbCr4:2:0 (2 2)
442
443
  Aperture: 9.5
443
444
  ImageSize: 300x199
444
- LensID: Minolta AF 28-135mm F4-4.5
445
+ LensID: Tokina AT-X 242 AF 24-200mm F3.5-5.6
445
446
  Megapixels: 0.06
446
447
  ScaleFactor35efl: 1.5
447
448
  ShutterSpeed: !ruby/object:Rational
@@ -456,7 +457,7 @@ result:
456
457
  ---
457
458
  sample: read test_coordinates.jpg
458
459
  result:
459
- ExifToolVersion: 10.55
460
+ ExifToolVersion: 11.7
460
461
  FileSize: 251 kB
461
462
  FileType: JPEG
462
463
  FileTypeExtension: jpg
@@ -510,9 +511,6 @@ result:
510
511
  ColorComponents: 3
511
512
  YCbCrSubSampling: YCbCr4:2:0 (2 2)
512
513
  Aperture: 2.4
513
- GPSLatitude: 43 deg 39' 11.40" N
514
- GPSLongitude: 79 deg 22' 23.40" W
515
- GPSPosition: 43 deg 39' 11.40" N, 79 deg 22' 23.40" W
516
514
  ImageSize: 1280x720
517
515
  Megapixels: 0.922
518
516
  ScaleFactor35efl: 8.5
@@ -520,15 +518,18 @@ result:
520
518
  denominator: 30
521
519
  numerator: 1
522
520
  ThumbnailImage: "(Binary data 3831 bytes, use -b option to extract)"
521
+ GPSLatitude: 43 deg 39' 11.40" N
522
+ GPSLongitude: 79 deg 22' 23.40" W
523
523
  CircleOfConfusion: 0.004 mm
524
524
  FOV: 54.4 deg
525
525
  FocalLength35efl: '4.1 mm (35 mm equivalent: 35.0 mm)'
526
+ GPSPosition: 43 deg 39' 11.40" N, 79 deg 22' 23.40" W
526
527
  HyperfocalDistance: 2.00 m
527
528
  LightValue: 5.4
528
529
  ---
529
530
  sample: read test_encodings.jpg
530
531
  result:
531
- ExifToolVersion: 10.55
532
+ ExifToolVersion: 11.7
532
533
  FileSize: 660 bytes
533
534
  FileType: JPEG
534
535
  FileTypeExtension: jpg
@@ -547,7 +548,7 @@ result:
547
548
  ---
548
549
  sample: read test_special_dates.jpg
549
550
  result:
550
- ExifToolVersion: 10.55
551
+ ExifToolVersion: 11.7
551
552
  FileSize: 3.7 kB
552
553
  FileType: JPEG
553
554
  FileTypeExtension: jpg
@@ -30,4 +30,11 @@ class TestReadNumerical < TestCase
30
30
  assert_kind_of String, @mini_exiftool_num['SupplementalCategories']
31
31
  end
32
32
 
33
+ # Catching github issue [#40]
34
+ # Values with leading zeros can have further zeros in it
35
+ # Thanks to jvradelis
36
+ def test_digits_starting_with_zero_and_has_further_zeros
37
+ assert_equal '0300', @mini_exiftool_num['PrintIMVersion']
38
+ end
39
+
33
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_exiftool
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Friedrich
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-01 00:00:00.000000000 Z
11
+ date: 2021-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: '2'
69
69
  description: |
70
70
  This library is a wrapper for the ExifTool command-line application
71
- (http://www.sno.phy.queensu.ca/~phil/exiftool) written by Phil Harvey.
71
+ (https://exiftool.org) written by Phil Harvey.
72
72
  It provides the full power of ExifTool to Ruby: reading and writing of
73
73
  EXIF-data, IPTC-data and XMP-data.
74
74
  email: janfri26@gmail.com
@@ -132,7 +132,7 @@ post_install_message: |
132
132
  | Please ensure you have installed exiftool at least version 7.65 |
133
133
  | and it's found in your PATH (Try "exiftool -ver" on your commandline).|
134
134
  | For more details see |
135
- | http://www.sno.phy.queensu.ca/~phil/exiftool/install.html |
135
+ | https://exiftool.org/install.html |
136
136
  | You need also Ruby 1.9 or higher. |
137
137
  | If you need support for Ruby 1.8 or exiftool prior 7.65 install |
138
138
  | mini_exiftool version < 2.0.0. |
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  version: '0'
153
153
  requirements: []
154
154
  rubygems_version: 3.1.2
155
- signing_key:
155
+ signing_key:
156
156
  specification_version: 4
157
- summary: This library is a wrapper for the ExifTool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool).
157
+ summary: This library is a wrapper for the ExifTool command-line application (https://exiftool.org).
158
158
  test_files: []