exif 0.11.2 → 1.0.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
  SHA1:
3
- metadata.gz: 9b5adb96e8b7db6ff48610dca63998d0d4401549
4
- data.tar.gz: 1d4a1699e0bfe49b4c774e3b49574ea24f23517d
3
+ metadata.gz: d039e9781e3484977eaa1f57d34d5fdeb3c7422a
4
+ data.tar.gz: 36d459ec69a08973f845931d827bf690dd494ae0
5
5
  SHA512:
6
- metadata.gz: a0b018a1378116895e7213bd537a3a1cad8fa3ad7c8fe46ddd4df9aaafeda2ef48c198d7b5ac1169784f59a826a244bf826265dceed4a9428a43d9c5263006d8
7
- data.tar.gz: b650457ffb0df660cfc16e84acdcd43c5f4dc9c2c618487227f4a3e40246b47e459dd65d038af4ee12042d0aa32c33c7b58ab465f4f07afb61863ecd25cc0b22
6
+ metadata.gz: 6b5c9f0d2a64c4d345512dd50476d32231be8fa1cb4aaed0e7f9c350b26f0c4c1d38a2ad172f25644243cb4ae59e6051aa31b1f0b682e983722456afe8343eae
7
+ data.tar.gz: 0da8b96a388e365dfeee2d9d0bca6cd24f761a3018a6d91299b957f6831281c1acaa367df87570821f815709fdab0ac3ec7dc31f29578d61b1928b6924e1347e
data/README.md CHANGED
@@ -4,7 +4,10 @@ Ruby EXIF reader written in C extension.
4
4
 
5
5
  $ gem install exif
6
6
 
7
- Please make sure you have installed `libexif` first.
7
+ Please make sure you have installed `libexif` first:
8
+
9
+ $ brew install libexif # Homebrew
10
+ $ sudo apt-get install libexif-dev # APT
8
11
 
9
12
  # Usage
10
13
 
@@ -26,19 +29,28 @@ data.to_h # => {0 => {...}, 1 => {...}, :exif => {...}}
26
29
 
27
30
  # How fast?
28
31
 
29
- There is another excellent work called [exifr](https://github.com/remvee/exifr) made by [@remvee](https://github.com/remvee). That's pure Ruby while this one is C extension. If you program JRuby, you may want to choose exifr, otherwise you can try this gem for speed purpose, it's about 8 times faster. A small benchmark shows below:
32
+ There are some other excellent works called [exifr](https://github.com/remvee/exifr) by [@remvee](https://github.com/remvee), and [mini_exiftool](https://github.com/janfri/mini_exiftool) by [@janfri](https://github.com/janfri). They're built in pure Ruby while this one is C extension.
33
+
34
+ If you program JRuby, you may want to choose exifr or mini_exiftool, the latter lets you get the full power of [Exiftool](http://www.sno.phy.queensu.ca/~phil/exiftool/) written by Phil Harvey since it's a command-line wrapper, otherwise you can try this gem for speed purpose. **It's about 8 times faster than exifr and 1200 times than that of mini_exiftool.**
35
+
36
+ A small benchmark shows below:
30
37
 
31
38
  ```ruby
32
39
  require 'benchmark'
33
- require 'exif'
40
+ require 'mini_exiftool'
34
41
  require 'exifr'
35
- N = 500
36
- FILE_PATH = 'sample.jpg'
42
+ require 'exif'
43
+
44
+ N = 50
45
+ FILE_PATH = File.expand_path('../../spec/sample.jpg', __FILE__)
37
46
  Benchmark.bmbm do |x|
38
- x.report '[exifr] init' do
47
+ x.report 'mini_exiftool' do
48
+ N.times{ MiniExiftool.new(FILE_PATH).image_width }
49
+ end
50
+ x.report 'exifr' do
39
51
  N.times{ EXIFR::JPEG.new(FILE_PATH).width }
40
52
  end
41
- x.report '[exif] init' do
53
+ x.report 'exif' do
42
54
  N.times{ Exif::Data.new(FILE_PATH).image_width }
43
55
  end
44
56
  end
@@ -46,14 +58,15 @@ end
46
58
 
47
59
  ```
48
60
  $ ruby benchmark/benchmark.rb
49
- Rehearsal ------------------------------------------------
50
- [exifr] init 0.810000 0.020000 0.830000 ( 0.840701)
51
- [exif] init 0.090000 0.010000 0.100000 ( 0.099700)
52
- --------------------------------------- total: 0.930000sec
53
-
54
- user system total real
55
- [exifr] init 0.810000 0.020000 0.830000 ( 0.830644)
56
- [exif] init 0.090000 0.010000 0.100000 ( 0.095148)
61
+ Rehearsal -------------------------------------------------
62
+ mini_exiftool 0.150000 0.050000 12.390000 ( 12.546417)
63
+ exifr 0.090000 0.000000 0.090000 ( 0.091090)
64
+ exif 0.010000 0.000000 0.010000 ( 0.010343)
65
+ --------------------------------------- total: 12.490000sec
66
+ user system total real
67
+ mini_exiftool 0.150000 0.050000 12.400000 ( 12.540122)
68
+ exifr 0.080000 0.000000 0.080000 ( 0.083251)
69
+ exif 0.010000 0.000000 0.010000 ( 0.009855)
57
70
  ```
58
71
 
59
72
  ## Tag Rreference
@@ -209,4 +222,5 @@ Rehearsal ------------------------------------------------
209
222
 
210
223
  # TODO
211
224
 
212
- 1. Support reading from String.
225
+ 1. Support reading from String.
226
+ 2. Create, update and delete tags.
@@ -1,15 +1,19 @@
1
1
  $: << File.expand_path('../../lib', __FILE__)
2
2
  require 'benchmark'
3
- require 'exif'
3
+ require 'mini_exiftool'
4
4
  require 'exifr'
5
+ require 'exif'
5
6
 
6
- N = 500
7
+ N = 50
7
8
  FILE_PATH = File.expand_path('../../spec/sample.jpg', __FILE__)
8
9
  Benchmark.bmbm do |x|
9
- x.report '[exifr] init' do
10
+ x.report 'mini_exiftool' do
11
+ N.times{ MiniExiftool.new(FILE_PATH).image_width }
12
+ end
13
+ x.report 'exifr' do
10
14
  N.times{ EXIFR::JPEG.new(FILE_PATH).width }
11
15
  end
12
- x.report '[exif] init' do
16
+ x.report 'exif' do
13
17
  N.times{ Exif::Data.new(FILE_PATH).image_width }
14
18
  end
15
- end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module Exif
2
- VERSION = "0.11.2"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exif
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jian Weihang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-30 00:00:00.000000000 Z
11
+ date: 2014-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler