tdiary-contrib 3.2.2.20130518 → 3.2.2.20130614
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -3
- data/doc/ja/plugin/image_gps.txt +56 -17
- data/doc/ja/plugin/playstore.txt +31 -0
- data/js/socialbutton.js +8 -2
- data/lib/exifparser/README +6 -12
- data/lib/tdiary-contrib.rb +7 -6
- data/plugin/brow_si.rb +32 -0
- data/plugin/image_gps.rb +110 -56
- data/plugin/instagr.rb +1 -0
- data/plugin/playstore.rb +161 -0
- data/plugin/tweet_quote.rb +102 -48
- data/plugin/twitter_badge.rb +1 -1
- data/util/estraier-search/estraier-register.rb +2 -1
- data/util/estraier-search/estraier-search.rb +2 -1
- data/util/image-gallery/misc/plugin/recent_image.rb +1 -1
- metadata +7 -27
- data/doc/ja/plugin/image_detail.txt +0 -69
- data/doc/ja/plugin/image_gps2.txt +0 -41
- data/lib/exifparser/BUGS +0 -1
- data/lib/exifparser/ChangeLog +0 -169
- data/lib/exifparser/install.rb +0 -1015
- data/lib/exifparser/lib/exifparser/makernote/canon.rb +0 -502
- data/lib/exifparser/lib/exifparser/makernote/fujifilm.rb +0 -415
- data/lib/exifparser/lib/exifparser/makernote/minolta.rb +0 -84
- data/lib/exifparser/lib/exifparser/makernote/mk_nikonflensname.rb +0 -39
- data/lib/exifparser/lib/exifparser/makernote/nikon.rb +0 -267
- data/lib/exifparser/lib/exifparser/makernote/nikon2.rb +0 -581
- data/lib/exifparser/lib/exifparser/makernote/nikonflensname.rb +0 -438
- data/lib/exifparser/lib/exifparser/makernote/olympus.rb +0 -225
- data/lib/exifparser/lib/exifparser/makernote/prove.rb +0 -84
- data/lib/exifparser/lib/exifparser/makernote/sigma.rb +0 -237
- data/lib/exifparser/lib/exifparser/pre-setup.rb +0 -1
- data/lib/exifparser/lib/exifparser/scan.rb +0 -278
- data/lib/exifparser/lib/exifparser/tag.rb +0 -2298
- data/lib/exifparser/lib/exifparser/thumbnail.rb +0 -76
- data/lib/exifparser/lib/exifparser/utils.rb +0 -88
- data/lib/exifparser/lib/exifparser.rb +0 -265
- data/lib/exifparser/sample/exifview.rb +0 -279
- data/plugin/image_detail.rb +0 -143
@@ -1,267 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# exifparser/makernote/nikon.rb -
|
3
|
-
#
|
4
|
-
# Copyright (C) 2002 Ryuichi Tamura (r-tam@fsinet.or.jp)
|
5
|
-
#
|
6
|
-
# $Revision: 1.1.1.1 $
|
7
|
-
# $Date: 2002/12/16 07:59:00 $
|
8
|
-
#
|
9
|
-
require 'exifparser/tag'
|
10
|
-
require 'exifparser/utils'
|
11
|
-
|
12
|
-
module Exif
|
13
|
-
|
14
|
-
module Tag
|
15
|
-
|
16
|
-
module MakerNote
|
17
|
-
|
18
|
-
#
|
19
|
-
# 0x0003 - Quality
|
20
|
-
#
|
21
|
-
class Quality < Base
|
22
|
-
|
23
|
-
def to_s
|
24
|
-
n = @formatted.to_i - 1
|
25
|
-
(s, q) = n.divmod(3)
|
26
|
-
|
27
|
-
f =
|
28
|
-
case s
|
29
|
-
when 0
|
30
|
-
'VGA'
|
31
|
-
when 1
|
32
|
-
'SVGA'
|
33
|
-
when 2
|
34
|
-
'SXGA'
|
35
|
-
when 3
|
36
|
-
'UXGA'
|
37
|
-
else
|
38
|
-
'Unknown size'
|
39
|
-
end
|
40
|
-
|
41
|
-
f << ' ' <<
|
42
|
-
case q
|
43
|
-
when 0
|
44
|
-
'Basic'
|
45
|
-
when 1
|
46
|
-
'Normal'
|
47
|
-
when 2
|
48
|
-
'Fine'
|
49
|
-
else
|
50
|
-
'Unknown quality'
|
51
|
-
end
|
52
|
-
f
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
#
|
58
|
-
# 0x0004 - ColorMode
|
59
|
-
#
|
60
|
-
class ColorMode < Base
|
61
|
-
|
62
|
-
def to_s
|
63
|
-
case @formatted
|
64
|
-
when 1
|
65
|
-
'Color'
|
66
|
-
when 2
|
67
|
-
'Monochrome'
|
68
|
-
else
|
69
|
-
'Unknown'
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
end
|
74
|
-
|
75
|
-
#
|
76
|
-
# 0x0005 - ImageAdjustment
|
77
|
-
#
|
78
|
-
class ImageAdjustment < Base
|
79
|
-
|
80
|
-
def to_s
|
81
|
-
case @formatted
|
82
|
-
when 0
|
83
|
-
'Normal'
|
84
|
-
when 1
|
85
|
-
'Bright+'
|
86
|
-
when 2
|
87
|
-
'Bright-'
|
88
|
-
when 3
|
89
|
-
'Contrast+'
|
90
|
-
when 4
|
91
|
-
'Contrast-'
|
92
|
-
else
|
93
|
-
'Unknown'
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
end
|
98
|
-
|
99
|
-
#
|
100
|
-
# 0x0006 - CCDSensitivity
|
101
|
-
#
|
102
|
-
class CCDSensitivity < Base
|
103
|
-
|
104
|
-
def to_s
|
105
|
-
case @formatted
|
106
|
-
when 0
|
107
|
-
'ISO80'
|
108
|
-
when 2
|
109
|
-
'ISO160'
|
110
|
-
when 4
|
111
|
-
'ISO320'
|
112
|
-
when 5
|
113
|
-
'ISO100'
|
114
|
-
else
|
115
|
-
"Unknown(#{@formatted})"
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
end
|
120
|
-
|
121
|
-
#
|
122
|
-
# 0x0007 - WhiteBalance
|
123
|
-
#
|
124
|
-
class WhiteBalance < Base
|
125
|
-
|
126
|
-
def to_s
|
127
|
-
case @formatted
|
128
|
-
when 0
|
129
|
-
'Auto'
|
130
|
-
when 1
|
131
|
-
'Preset'
|
132
|
-
when 2
|
133
|
-
'Daylight'
|
134
|
-
when 3
|
135
|
-
'Incandescense'
|
136
|
-
when 4
|
137
|
-
'Fluorescence'
|
138
|
-
when 5
|
139
|
-
'Cloudy'
|
140
|
-
when 6
|
141
|
-
'SpeedLight'
|
142
|
-
else
|
143
|
-
"Unknown(#{@formatted})"
|
144
|
-
end
|
145
|
-
end
|
146
|
-
|
147
|
-
end
|
148
|
-
|
149
|
-
#
|
150
|
-
# 0x0008 - Focus
|
151
|
-
#
|
152
|
-
class Focus < Base
|
153
|
-
|
154
|
-
def to_s
|
155
|
-
n = @formatted.numerator
|
156
|
-
d = @formatted.denominator
|
157
|
-
(n == 1 && d == 0) ? 'Pan Focus' : "#{n}/#{d}"
|
158
|
-
end
|
159
|
-
|
160
|
-
end
|
161
|
-
|
162
|
-
#
|
163
|
-
# 0x000a - DigitalZoom
|
164
|
-
#
|
165
|
-
class DigitalZoom < Base
|
166
|
-
|
167
|
-
def to_s
|
168
|
-
n = @formatted.numerator
|
169
|
-
d = @formatted.denominator
|
170
|
-
(n == 0 && d == 100) ? 'None' : "%0.1f"%[n.to_f/d.to_f]
|
171
|
-
end
|
172
|
-
|
173
|
-
end
|
174
|
-
|
175
|
-
#
|
176
|
-
# 0x000b - Converter
|
177
|
-
#
|
178
|
-
class Converter < Base
|
179
|
-
|
180
|
-
def to_s
|
181
|
-
case @formatted
|
182
|
-
when 0
|
183
|
-
'None'
|
184
|
-
when 1
|
185
|
-
'Fisheye'
|
186
|
-
else
|
187
|
-
'Unknown'
|
188
|
-
end
|
189
|
-
end
|
190
|
-
|
191
|
-
end
|
192
|
-
|
193
|
-
end
|
194
|
-
|
195
|
-
NikonIFDTable = {
|
196
|
-
0x0003 => MakerNote::Quality,
|
197
|
-
0x0004 => MakerNote::ColorMode,
|
198
|
-
0x0005 => MakerNote::ImageAdjustment,
|
199
|
-
0x0006 => MakerNote::CCDSensitivity,
|
200
|
-
0x0007 => MakerNote::WhiteBalance,
|
201
|
-
0x0008 => MakerNote::Focus,
|
202
|
-
0x000a => MakerNote::DigitalZoom,
|
203
|
-
0x000b => MakerNote::Converter
|
204
|
-
}
|
205
|
-
|
206
|
-
end
|
207
|
-
|
208
|
-
class Nikon
|
209
|
-
|
210
|
-
def initialize(fin, tiff_origin, dataPos, byteOrder_module)
|
211
|
-
@fin = fin
|
212
|
-
@tiffHeader0 = tiff_origin
|
213
|
-
@dataPos = dataPos
|
214
|
-
@byteOrder_module = byteOrder_module
|
215
|
-
self.extend @byteOrder_module
|
216
|
-
end
|
217
|
-
|
218
|
-
def scan_IFD
|
219
|
-
#
|
220
|
-
# Nikon MakerNote starts from 8 byte from the origin.
|
221
|
-
#
|
222
|
-
@fin.pos = @dataPos + 8
|
223
|
-
#
|
224
|
-
# get the number of tags
|
225
|
-
#
|
226
|
-
num_dirs = decode_ushort(fin_read_n(2))
|
227
|
-
|
228
|
-
#
|
229
|
-
# now scan them
|
230
|
-
#
|
231
|
-
1.upto(num_dirs) {
|
232
|
-
curpos_tag = @fin.pos
|
233
|
-
tag = parseTagID(fin_read_n(2))
|
234
|
-
tagclass = Tag.find(tag.hex, Tag::NikonIFDTable)
|
235
|
-
unit, formatter = Tag::Format::Unit[decode_ushort(fin_read_n(2))]
|
236
|
-
count = decode_ulong(fin_read_n(4))
|
237
|
-
tagdata = fin_read_n(4)
|
238
|
-
obj = tagclass.new(tag, "MakerNote", count)
|
239
|
-
obj.extend formatter, @byteOrder_module
|
240
|
-
obj.pos = curpos_tag
|
241
|
-
if unit * count > 4
|
242
|
-
curpos = @fin.pos
|
243
|
-
begin
|
244
|
-
@fin.pos = @tiffHeader0 + decode_ulong(tagdata)
|
245
|
-
obj.dataPos = @fin.pos
|
246
|
-
obj.data = fin_read_n(unit*count)
|
247
|
-
ensure
|
248
|
-
@fin.pos = curpos
|
249
|
-
end
|
250
|
-
else
|
251
|
-
obj.dataPos = @fin.pos - 4
|
252
|
-
obj.data = tagdata
|
253
|
-
end
|
254
|
-
obj.processData
|
255
|
-
yield obj
|
256
|
-
}
|
257
|
-
end
|
258
|
-
|
259
|
-
private
|
260
|
-
|
261
|
-
def fin_read_n(n)
|
262
|
-
@fin.read(n)
|
263
|
-
end
|
264
|
-
|
265
|
-
end
|
266
|
-
|
267
|
-
end
|