exifr 1.2.1 → 1.2.2
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.
- data/CHANGELOG +3 -0
- data/lib/exifr/jpeg.rb +15 -11
- metadata +52 -32
- checksums.yaml +0 -7
data/CHANGELOG
CHANGED
data/lib/exifr/jpeg.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'exifr'
|
4
4
|
require 'stringio'
|
5
|
+
require 'delegate'
|
5
6
|
|
6
7
|
module EXIFR
|
7
8
|
# = JPEG decoder
|
@@ -76,18 +77,21 @@ module EXIFR
|
|
76
77
|
end
|
77
78
|
|
78
79
|
private
|
80
|
+
|
81
|
+
class Reader < SimpleDelegator
|
82
|
+
def readbyte; readchar; end unless File.method_defined?(:readbyte)
|
83
|
+
def readint; (readbyte << 8) + readbyte; end
|
84
|
+
def readframe; read(readint - 2); end
|
85
|
+
def readsof; [readint, readbyte, readint, readint, readbyte]; end
|
86
|
+
def next
|
87
|
+
c = readbyte while c != 0xFF
|
88
|
+
c = readbyte while c == 0xFF
|
89
|
+
c
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
79
93
|
def examine(io)
|
80
|
-
|
81
|
-
def readbyte; readchar; end unless method_defined?(:readbyte)
|
82
|
-
def readint; (readbyte << 8) + readbyte; end
|
83
|
-
def readframe; read(readint - 2); end
|
84
|
-
def readsof; [readint, readbyte, readint, readint, readbyte]; end
|
85
|
-
def next
|
86
|
-
c = readbyte while c != 0xFF
|
87
|
-
c = readbyte while c == 0xFF
|
88
|
-
c
|
89
|
-
end
|
90
|
-
end unless io.respond_to? :readsof
|
94
|
+
io = Reader.new(io)
|
91
95
|
|
92
96
|
unless io.readbyte == 0xFF && io.readbyte == 0xD8 # SOI
|
93
97
|
raise MalformedJPEG, "no start of image marker found"
|
metadata
CHANGED
@@ -1,80 +1,100 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: exifr
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 2
|
9
|
+
- 2
|
10
|
+
version: 1.2.2
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- R.W. van 't Veer
|
8
14
|
autorequire:
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
|
-
|
17
|
+
|
18
|
+
date: 2015-05-03 00:00:00 +02:00
|
19
|
+
default_executable:
|
12
20
|
dependencies: []
|
21
|
+
|
13
22
|
description: EXIF Reader is a module to read EXIF from JPEG and TIFF images.
|
14
23
|
email: remco@remvee.net
|
15
|
-
executables:
|
24
|
+
executables:
|
16
25
|
- exifr
|
17
26
|
extensions: []
|
18
|
-
|
27
|
+
|
28
|
+
extra_rdoc_files:
|
19
29
|
- README.rdoc
|
20
30
|
- CHANGELOG
|
21
|
-
files:
|
22
|
-
- CHANGELOG
|
23
|
-
- README.rdoc
|
31
|
+
files:
|
24
32
|
- Rakefile
|
25
33
|
- bin/exifr
|
26
34
|
- lib/exifr.rb
|
27
35
|
- lib/exifr/jpeg.rb
|
28
36
|
- lib/exifr/tiff.rb
|
29
37
|
- tests/data/1x1.jpg
|
30
|
-
- tests/data/Canon_PowerShot_A85.exif
|
31
|
-
- tests/data/Casio-EX-S20.exif
|
32
|
-
- tests/data/FUJIFILM-FinePix_S3000.exif
|
33
|
-
- tests/data/Panasonic-DMC-LC33.exif
|
34
|
-
- tests/data/Trust-DC3500_MINI.exif
|
35
38
|
- tests/data/apple-aperture-1.5.exif
|
36
|
-
- tests/data/bad-shutter_speed_value.exif
|
37
39
|
- tests/data/canon-g3.exif
|
40
|
+
- tests/data/Canon_PowerShot_A85.exif
|
41
|
+
- tests/data/Casio-EX-S20.exif
|
38
42
|
- tests/data/endless-loop.exif
|
39
43
|
- tests/data/exif.jpg
|
44
|
+
- tests/data/FUJIFILM-FinePix_S3000.exif
|
40
45
|
- tests/data/gps.exif
|
41
46
|
- tests/data/image.jpg
|
42
47
|
- tests/data/multiple-app1.jpg
|
43
48
|
- tests/data/negative-exposure-bias-value.exif
|
44
49
|
- tests/data/nikon_d1x.tif
|
45
50
|
- tests/data/out-of-range.exif
|
51
|
+
- tests/data/Panasonic-DMC-LC33.exif
|
46
52
|
- tests/data/plain.tif
|
53
|
+
- tests/data/Trust-DC3500_MINI.exif
|
47
54
|
- tests/data/user-comment.exif
|
48
55
|
- tests/data/weird_date.exif
|
56
|
+
- tests/data/bad-shutter_speed_value.exif
|
49
57
|
- tests/jpeg_test.rb
|
50
58
|
- tests/test_helper.rb
|
51
59
|
- tests/tiff_test.rb
|
60
|
+
- README.rdoc
|
61
|
+
- CHANGELOG
|
62
|
+
has_rdoc: true
|
52
63
|
homepage: http://github.com/remvee/exifr/
|
53
|
-
licenses:
|
64
|
+
licenses:
|
54
65
|
- MIT
|
55
|
-
metadata: {}
|
56
66
|
post_install_message:
|
57
|
-
rdoc_options:
|
58
|
-
-
|
67
|
+
rdoc_options:
|
68
|
+
- --title
|
59
69
|
- EXIF Reader for Ruby API Documentation
|
60
|
-
-
|
70
|
+
- --main
|
61
71
|
- README.rdoc
|
62
|
-
require_paths:
|
72
|
+
require_paths:
|
63
73
|
- lib
|
64
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
-
|
74
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
66
77
|
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
|
69
|
-
|
70
|
-
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
hash: 3
|
80
|
+
segments:
|
81
|
+
- 0
|
82
|
+
version: "0"
|
83
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
85
|
+
requirements:
|
71
86
|
- - ">="
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
hash: 3
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
version: "0"
|
74
92
|
requirements: []
|
93
|
+
|
75
94
|
rubyforge_project:
|
76
|
-
rubygems_version:
|
95
|
+
rubygems_version: 1.4.2
|
77
96
|
signing_key:
|
78
|
-
specification_version:
|
97
|
+
specification_version: 3
|
79
98
|
summary: Read EXIF from JPEG and TIFF images
|
80
99
|
test_files: []
|
100
|
+
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: bf4c33c21139fd7d83d9e101819c2e82dea47766
|
4
|
-
data.tar.gz: a296b4cb86cedcdf4c03d86794c7be061fd85b4e
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: e55c2f8d1d5be3d3dd640281f727756bf96d0feeafae711638a69c42085454a3fd84d8ce2d257ee2925133308306e12d4cc2bb6cc9280dc05b19fbb9ca90f135
|
7
|
-
data.tar.gz: 289f412a4599fbcac93aa2d420e3602f5f256f7c95939d188830003e23f50970c569c72929a4cf4f296fd9283a58a62fbbe9110e48f9f32efcdcda5693deb827
|