rjhead 0.2.88
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +5 -0
- data/LICENSE +20 -0
- data/README.rdoc +18 -0
- data/Rakefile +57 -0
- data/VERSION +1 -0
- data/ext/changes.txt +351 -0
- data/ext/exif.c +1629 -0
- data/ext/extconf.rb +0 -0
- data/ext/gpsinfo.c +217 -0
- data/ext/iptc.c +205 -0
- data/ext/jhead.1 +409 -0
- data/ext/jhead.c +1697 -0
- data/ext/jhead.h +251 -0
- data/ext/jhead.spec +149 -0
- data/ext/jpgfile.c +738 -0
- data/ext/make.bat +1 -0
- data/ext/makefile +23 -0
- data/ext/makefile-win32 +27 -0
- data/ext/makernote.c +184 -0
- data/ext/myglob.c +305 -0
- data/ext/paths.c +140 -0
- data/ext/readme.txt +60 -0
- data/ext/usage.html +469 -0
- data/lib/rjhead.rb +0 -0
- data/rjhead.gemspec +73 -0
- data/setup.rake +1 -0
- data/test/rjhead_test.rb +7 -0
- data/test/test_helper.rb +10 -0
- metadata +94 -0
data/.document
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Michael Dwan
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
= rjhead
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Note on Patches/Pull Requests
|
6
|
+
|
7
|
+
* Fork the project.
|
8
|
+
* Make your feature addition or bug fix.
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
10
|
+
future version unintentionally.
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
12
|
+
(if you want to have your own version, that is fine but
|
13
|
+
bump version in a commit by itself I can ignore when I pull)
|
14
|
+
* Send me a pull request. Bonus points for topic branches.
|
15
|
+
|
16
|
+
== Copyright
|
17
|
+
|
18
|
+
Copyright (c) 2009 Michael Dwan. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "rjhead"
|
8
|
+
gem.summary = %Q{stuff}
|
9
|
+
gem.description = %Q{stuff}
|
10
|
+
gem.email = "mpdwan@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/michaeldwan/rjhead"
|
12
|
+
gem.authors = ["Michael Dwan"]
|
13
|
+
gem.add_development_dependency "thoughtbot-shoulda"
|
14
|
+
gem.extensions << 'ext/extconf.rb'
|
15
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
|
+
end
|
17
|
+
rescue LoadError
|
18
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'rake/testtask'
|
22
|
+
Rake::TestTask.new(:test) do |test|
|
23
|
+
test.libs << 'lib' << 'test'
|
24
|
+
test.pattern = 'test/**/*_test.rb'
|
25
|
+
test.verbose = true
|
26
|
+
end
|
27
|
+
|
28
|
+
begin
|
29
|
+
require 'rcov/rcovtask'
|
30
|
+
Rcov::RcovTask.new do |test|
|
31
|
+
test.libs << 'test'
|
32
|
+
test.pattern = 'test/**/*_test.rb'
|
33
|
+
test.verbose = true
|
34
|
+
end
|
35
|
+
rescue LoadError
|
36
|
+
task :rcov do
|
37
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
task :test => :check_dependencies
|
42
|
+
|
43
|
+
task :default => :test
|
44
|
+
|
45
|
+
require 'rake/rdoctask'
|
46
|
+
Rake::RDocTask.new do |rdoc|
|
47
|
+
if File.exist?('VERSION')
|
48
|
+
version = File.read('VERSION')
|
49
|
+
else
|
50
|
+
version = ""
|
51
|
+
end
|
52
|
+
|
53
|
+
rdoc.rdoc_dir = 'rdoc'
|
54
|
+
rdoc.title = "rjhead #{version}"
|
55
|
+
rdoc.rdoc_files.include('README*')
|
56
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
57
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.2.88
|
data/ext/changes.txt
ADDED
@@ -0,0 +1,351 @@
|
|
1
|
+
****************************************************
|
2
|
+
***** Detailed change log - since version 1.2 *****
|
3
|
+
***** In cronological order, oldest to newest *****
|
4
|
+
****************************************************
|
5
|
+
|
6
|
+
Jun 3 2001:
|
7
|
+
Added -dc option for deleting all comments
|
8
|
+
|
9
|
+
Jun 5 2001:
|
10
|
+
No longer clip comment length at 200 characters on display
|
11
|
+
|
12
|
+
Jul 16 2001
|
13
|
+
Follow TIFF link correctly
|
14
|
+
Save thumbnail option added
|
15
|
+
(Thanks Michal D Hughes for his help mdh(a)logcabin.woods.bridge.com)
|
16
|
+
|
17
|
+
Aug 8 & 9 2001
|
18
|
+
Transfer exif header option added.
|
19
|
+
Moved relative path & discard all but jpeg stuff in separate functions
|
20
|
+
Changed ISO heuristic to deal with ISo < 80 better
|
21
|
+
(Thanks Harry TsaiHarryTsai(a)alum.mit.edu)
|
22
|
+
|
23
|
+
Agust 12 2001
|
24
|
+
Testing under Linux, minor fixups.
|
25
|
+
|
26
|
+
-------Released version 1.3-------
|
27
|
+
|
28
|
+
August 26 2001
|
29
|
+
Fixed problem where thumbnails in big endian files were not saved right.
|
30
|
+
(thanks Joe Steele [joe(a)madewell.com])
|
31
|
+
|
32
|
+
Sept 1 2001
|
33
|
+
Added command line option to remove exif section entirely.
|
34
|
+
Added time / time-zone adjust option.
|
35
|
+
|
36
|
+
Sept 9 2001
|
37
|
+
Avoid renaming file with right name again with -n option
|
38
|
+
Change name of SetFileTime variable to not conflict with windows.
|
39
|
+
|
40
|
+
Oct 9 2001
|
41
|
+
Added option to set exif timestamp to absolute time
|
42
|
+
Added option to save thumbnail to stdout (unix only)
|
43
|
+
(thanks Nathan Schmidt [mailto:nathan(a)cs.stanford.edu])
|
44
|
+
Fixed bug in parsing truncated exif headers
|
45
|
+
(thanks Joachim.Geyer(a)djh-freeweb.de)
|
46
|
+
Got rid of strnprintf (not avilable on FreeBSD 4.4)
|
47
|
+
|
48
|
+
-------Released version 1.4-------
|
49
|
+
|
50
|
+
Oct 10 2001
|
51
|
+
More improved handling of truncated exif headers - as may be produced
|
52
|
+
by -dt option in older versions of this program.
|
53
|
+
|
54
|
+
Oct 18 2001
|
55
|
+
Fixed bug in -ts option where '-' causes scanf to treat parms as negative.
|
56
|
+
(thanks Pete Ashdon [mailto:pashdown(a)xmission.com])
|
57
|
+
|
58
|
+
Oct 25 2001
|
59
|
+
Added -ce option
|
60
|
+
|
61
|
+
-------Released version 1.5-------
|
62
|
+
|
63
|
+
Dec 26 2001
|
64
|
+
Added -V (version) option
|
65
|
+
Added -exonly (exif only) option
|
66
|
+
|
67
|
+
|
68
|
+
Jan 2 2002:
|
69
|
+
Fixed lots of typos (Thanks, David Baker [mailto:dave(a)dsb3.com])
|
70
|
+
|
71
|
+
Jan 12: 2002
|
72
|
+
Use EDITOR environment variable to pick which editor (Instead of notpead or VI)
|
73
|
+
|
74
|
+
Jan 13: 2002
|
75
|
+
Improved thumbnail deletion feature - now not just shortens the header, but
|
76
|
+
also removes pointers to the thumbnail form the exif header.
|
77
|
+
|
78
|
+
|
79
|
+
-------Released version 1.6-------
|
80
|
+
|
81
|
+
Jan 29 2002
|
82
|
+
Use adjusted date instead of original date when -ta is used in combination
|
83
|
+
with -ft or -n options
|
84
|
+
|
85
|
+
Feb 25 2002
|
86
|
+
Added image orientation display to summary
|
87
|
+
|
88
|
+
April 22 2002
|
89
|
+
Changed 35mm equivalent focal calculation to use 36mm instead of 35mm for 35mm
|
90
|
+
negative width (35 mm negative frames are 36 mm wide)
|
91
|
+
|
92
|
+
April 28 2002
|
93
|
+
Split jhead.c int jhead.c and jpgfile.c. Jpgfile.c contains jpeg manipulation
|
94
|
+
code that is reusable outside of jhead, while jhead.c contains code specific
|
95
|
+
to jhead (command line parsing, display)
|
96
|
+
|
97
|
+
May 11 2002
|
98
|
+
Fix bug in -dt option that rears its ugly head if the directories are in the
|
99
|
+
exif header out of order.
|
100
|
+
|
101
|
+
-------Released version 1.7-------
|
102
|
+
|
103
|
+
June 3 2002
|
104
|
+
Ignore undefined bits of "flash used" tag, as cannon sets them nonzero, causing
|
105
|
+
jhead to indicate flash used when it wasn't with some Canon models.
|
106
|
+
|
107
|
+
Jul 7 2002
|
108
|
+
-------Released version 1.8-------
|
109
|
+
|
110
|
+
Sept 8 2002
|
111
|
+
makehtml now also lists .avi files as video clips
|
112
|
+
|
113
|
+
Sept 11 2002
|
114
|
+
Handle first IFD offset != 8, as comes out of Pentax Optio 230 camera.
|
115
|
+
|
116
|
+
Sept 13 2002
|
117
|
+
Show 4 digits of past decimal if exposrure time is less than 0.01 sec.
|
118
|
+
|
119
|
+
Sept 25 2002
|
120
|
+
Integrate patch from James R Van Zandt to allow inclusion of original name
|
121
|
+
when '%f' is part of rename format string.
|
122
|
+
|
123
|
+
Dec 11 2002
|
124
|
+
-------Released version 1.9-------
|
125
|
+
|
126
|
+
Oct 8 2002
|
127
|
+
Minor changes where newlines are printed.
|
128
|
+
Added check to warn about wiping out the originals with the -st option.
|
129
|
+
|
130
|
+
Oct 9 2002
|
131
|
+
Fixed display of "flash used=no" for exif headers generated by photoshop.
|
132
|
+
|
133
|
+
Oct 13 2002
|
134
|
+
Added -ci and -cs options.
|
135
|
+
|
136
|
+
March 3 2003
|
137
|
+
Limit directory recursion depth to avoid crashing on circularly linked
|
138
|
+
directories within the Exif header.
|
139
|
+
|
140
|
+
April 6 2003
|
141
|
+
Added automatic rottion (-autorotate) to right-up images that contain
|
142
|
+
a rotation tag from the camera.
|
143
|
+
|
144
|
+
*Finally* wrote a nice MAN page for jhead.
|
145
|
+
|
146
|
+
-------Released version 2.0 -- April 2003 -------
|
147
|
+
|
148
|
+
Dec ?? 2003
|
149
|
+
Set all copies of the date to same value when setting or modifying.
|
150
|
+
(I intentionally only set one, but too may people considered this a bug)
|
151
|
+
|
152
|
+
Dec 28 2003
|
153
|
+
fixed unix makefile
|
154
|
+
|
155
|
+
Dec 29 2003
|
156
|
+
added -cl (insert comment literal) option
|
157
|
+
|
158
|
+
Jan 8 2004
|
159
|
+
Added -norot (zero out rotation tag) option
|
160
|
+
|
161
|
+
-------Released version 2.1 -- Jan 2004 -------
|
162
|
+
|
163
|
+
Jan 12
|
164
|
+
Added handling of explicit 35mm equivalent tag
|
165
|
+
fixed inconsistency in computing 35 mm equivalent focal lengths between
|
166
|
+
concise and regular output.
|
167
|
+
|
168
|
+
Jan 17
|
169
|
+
Impelemented optoin to supress file date display, for regression tests.
|
170
|
+
|
171
|
+
Feb 1
|
172
|
+
Better indentatin of verbose option, rudementary canon maker not parsing
|
173
|
+
|
174
|
+
March
|
175
|
+
Various spelling errors fixed in output strings, and
|
176
|
+
jpeg --> JPEG, exif --> Exif
|
177
|
+
|
178
|
+
April 13
|
179
|
+
Use '-outfile' command line option of jpegtran when launching jpegtran to
|
180
|
+
do rotation so that syntax of launched command is same on Windows and Unix.
|
181
|
+
|
182
|
+
April 19
|
183
|
+
Various spelling fixes in manapge.
|
184
|
+
|
185
|
+
Jun 20
|
186
|
+
Added ability to do sequencial renaming ('%i' in format string for -n option)
|
187
|
+
|
188
|
+
-------Released version 2.2 -- Jun 2004 ----------
|
189
|
+
|
190
|
+
Handle some oddities - like '/' separators in date fields, or images with
|
191
|
+
an orientation tag for the thumbnail.
|
192
|
+
|
193
|
+
Increase maximum number of jpeg sections to 40 from 20
|
194
|
+
|
195
|
+
Dec 3
|
196
|
+
Don't try to write to readonly files.
|
197
|
+
Use changed copy of date/time for rename and file time set operations
|
198
|
+
|
199
|
+
Dec 25
|
200
|
+
Added -purejpg and -du options
|
201
|
+
|
202
|
+
Dec 28
|
203
|
+
More details on flash usage.
|
204
|
+
Show digital zoom ratio
|
205
|
+
Don't show jpeg process if it's baseline (almost always is)
|
206
|
+
|
207
|
+
-------Released version 2.3 -- Jan 2005 ----------
|
208
|
+
|
209
|
+
Jan 14 2005
|
210
|
+
Display GPS info if included in image
|
211
|
+
|
212
|
+
Feb 27 2004
|
213
|
+
Fix some time reference confusion bugs relating to -ta option
|
214
|
+
|
215
|
+
May 29 2005
|
216
|
+
Added -da option for easier adjusting of date/time by large amounts.
|
217
|
+
|
218
|
+
-------Released version 2.4 -- May 2005 ----------
|
219
|
+
|
220
|
+
Jun 06 2005
|
221
|
+
Fix -da option
|
222
|
+
|
223
|
+
-------Released version 2.4-1 -- Jun 09 2005 --------
|
224
|
+
|
225
|
+
Jun 10 2005
|
226
|
+
Removed some debug printf I accidentally left in!
|
227
|
+
|
228
|
+
-------Released version 2.4-2 -- Jun 10 2005 --------
|
229
|
+
|
230
|
+
August 8 2005
|
231
|
+
Avoid duplicating exif header on some commands
|
232
|
+
|
233
|
+
Sept 11 2005
|
234
|
+
Fix up return codes.
|
235
|
+
|
236
|
+
Oct 8 2005
|
237
|
+
Preserve file permissions and time when files are modified.
|
238
|
+
|
239
|
+
Oct 29 2005
|
240
|
+
Read ISO euqivalnt and white balance from canon makernote
|
241
|
+
|
242
|
+
Nov 5 2005
|
243
|
+
Added -rt (replace thumbnail) feature, and rotate the thumbnail also
|
244
|
+
when using the -autorot feature
|
245
|
+
|
246
|
+
Dec 28 2005
|
247
|
+
Added -rgt (regenerate thumbnail) feature.
|
248
|
+
Added -orp and -orl options
|
249
|
+
|
250
|
+
-------Released version 2.5 -- Jan 8 2006 --------
|
251
|
+
Jan 28 2006
|
252
|
+
Fix typecast issue run itno with GCC 4
|
253
|
+
|
254
|
+
Feb 17 2006
|
255
|
+
Fix shutter speed display in '-c' mode for very long shutter speeds
|
256
|
+
|
257
|
+
Feb 26 2006
|
258
|
+
Fix some nitpicks from Debian folks
|
259
|
+
|
260
|
+
Mar 6 2006
|
261
|
+
Fix a bug in autorot when rotating filenames with spaces in them.
|
262
|
+
|
263
|
+
April 2 2006
|
264
|
+
Improved handling of corrupt exif linkages in exif header
|
265
|
+
|
266
|
+
April 3 2006
|
267
|
+
Added -a (rename associated files) options
|
268
|
+
|
269
|
+
-------Released version 2.6 -- April 29 2006 --------
|
270
|
+
|
271
|
+
Sept 9 2006
|
272
|
+
Remove maximum jpeg sections limit
|
273
|
+
|
274
|
+
Sept 10 2006
|
275
|
+
Added -ds option
|
276
|
+
|
277
|
+
Oct 18 2006
|
278
|
+
On clearing rotation, clear the image and the optinoal thumbnail rotation tags.
|
279
|
+
(some viewers use the wrong tag)
|
280
|
+
|
281
|
+
Dec 29 2006
|
282
|
+
Add -mkexif option to make a new exif header.
|
283
|
+
|
284
|
+
-------Released version 2.7 -- Jan 11 2007 --------
|
285
|
+
|
286
|
+
Feb 10 2007
|
287
|
+
Added IPTC handling
|
288
|
+
|
289
|
+
Feb 11 2007
|
290
|
+
Added -q option
|
291
|
+
|
292
|
+
Feb 17 2007
|
293
|
+
Fix handling of corrupted GPS directory.
|
294
|
+
|
295
|
+
Feb 18 2007
|
296
|
+
Extract focus distance from canon makernote.
|
297
|
+
|
298
|
+
Jun 3 2007
|
299
|
+
Extract subject range (pentax and fuji cameras)
|
300
|
+
|
301
|
+
-------Released version 2.8 -- Nov 13 2007 --------
|
302
|
+
|
303
|
+
Feb 14 2008
|
304
|
+
Fix it so it no longer deletex XMP sections
|
305
|
+
Improve IPTC handling a little
|
306
|
+
|
307
|
+
March 3 2008
|
308
|
+
Change how date is encoded with -mkexif section to make it more compatible.
|
309
|
+
Make jhead aware of XMP data and not delete it.
|
310
|
+
|
311
|
+
-------Released version 2.82 -- Apr 03 2008 --------
|
312
|
+
|
313
|
+
May 8 2008
|
314
|
+
Decode more exif tags for '-v' mode.
|
315
|
+
|
316
|
+
Sep 23 2008
|
317
|
+
Fix a bunch of potential string overflows
|
318
|
+
|
319
|
+
Oct 1 2008
|
320
|
+
Fix bug where IPTC sction was not deleted by -purejpg
|
321
|
+
Fix GPS altitude decode bug
|
322
|
+
|
323
|
+
-------Released version 2.84 -- Oct 4 2008 --------
|
324
|
+
|
325
|
+
Jan 15 2008
|
326
|
+
Fix bug with -ce introduced as a result of putting all the security
|
327
|
+
checks the debian people wanted.
|
328
|
+
|
329
|
+
Feb 2 2008
|
330
|
+
Added the ability to move files with the -n option. (makes directories if necessary)
|
331
|
+
|
332
|
+
Various minor typo and documentation fixes.
|
333
|
+
|
334
|
+
-------Released version 2.86 -- Feb 14 2009 --------
|
335
|
+
|
336
|
+
Fixed an #ifdef that I had defined the wrong way, causing the -ce option to fail.
|
337
|
+
|
338
|
+
-------Released version 2.87 -- Mar 03 2009 --------
|
339
|
+
|
340
|
+
May 2009:
|
341
|
+
A few more tags recognized with jhead -v
|
342
|
+
Accept strange date encoding of LG VX-9700
|
343
|
+
Fix metering mode display
|
344
|
+
Fix crash bug on corrupted jpeg
|
345
|
+
Deal better with extra padding bytes between jpeg markers
|
346
|
+
|
347
|
+
Nov 3 2009:
|
348
|
+
Now preserve resoltuion units of jfif header, or set them with info from exif header.
|
349
|
+
|
350
|
+
|
351
|
+
-------Released version 2.88 -- Nov 6 2009 --------
|