Hello community,
here is the log from the commit of package jhead for openSUSE:Factory
checked in at Thu Aug 6 01:04:54 CEST 2009.
--------
--- jhead/jhead.changes 2009-01-05 18:40:01.000000000 +0100
+++ /mounts/work_src_done/STABLE/jhead/jhead.changes 2009-08-05 19:29:28.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Aug 5 19:26:59 CEST 2009 - sbrabec@suse.cz
+
+- Updated to version 2.87:
+ * Added the ability to move files with the -n option.
+ * Minor fixes.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
jhead-2.84.tar.bz2
jhead-DoCommand.patch
New:
----
jhead-2.87.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ jhead.spec ++++++
--- /var/tmp/diff_new_pack.U79loX/_old 2009-08-06 01:04:40.000000000 +0200
+++ /var/tmp/diff_new_pack.U79loX/_new 2009-08-06 01:04:40.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package jhead (Version 2.84)
+# spec file for package jhead (Version 2.87)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,16 +19,14 @@
Name: jhead
-License: Public Domain, Freeware; Public Domain. See http://www.sentex.ca/~mwandel/jhead/
+License: Public Domain, Freeware ; Public Domain. See http://www.sentex.ca/~mwandel/jhead/
Group: Productivity/Graphics/Other
-AutoReqProv: on
-Version: 2.84
-Release: 2
+Version: 2.87
+Release: 1
Requires: %{_bindir}/jpegtran %{_bindir}/mogrify
Summary: Tool to Manipulate the Nonimage Part of EXIF Compliant JPEG Files
Url: http://www.sentex.net/~mwandel/jhead/
Source: %{name}-%{version}.tar.bz2
-Patch: jhead-DoCommand.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -47,9 +45,6 @@
%prep
%setup -q
-%patch
-# Let RPM compress it according to actual policy.
-gunzip jhead.1.gz
%build
make CC="gcc $RPM_OPT_FLAGS"
++++++ jhead-2.84.tar.bz2 -> jhead-2.87.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/changes.txt new/jhead-2.87/changes.txt
--- old/jhead-2.84/changes.txt 2008-10-04 18:10:34.000000000 +0200
+++ new/jhead-2.87/changes.txt 2009-03-02 14:34:10.000000000 +0100
@@ -319,4 +319,19 @@
Fix bug where IPTC sction was not deleted by -purejpg
Fix GPS altitude decode bug
--------Released version 2.84 -- Oct 4 2008 --------
\ No newline at end of file
+-------Released version 2.84 -- Oct 4 2008 --------
+
+Jan 15 2008
+Fix bug with -ce introduced as a result of putting all the security
+checks the debian people wanted.
+
+Feb 2 2008
+Added the ability to move files with the -n option. (makes directories if necessary)
+
+Various minor typo and documentation fixes.
+
+-------Released version 2.86 -- Feb 14 2009 --------
+
+Fixed an #ifdef that I had defined the wrong way, causing the -ce option to fail.
+
+-------Released version 2.86 -- Mar 02 2009 --------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/exif.c new/jhead-2.87/exif.c
--- old/jhead-2.84/exif.c 2008-10-04 18:10:35.000000000 +0200
+++ new/jhead-2.87/exif.c 2009-03-02 14:34:10.000000000 +0100
@@ -477,7 +477,7 @@
}
}
if (DumpExifMap){
- printf("Map: %05d-%05d: Directory\n",DirStart-OffsetBase, DirEnd+4-OffsetBase);
+ printf("Map: %05d-%05d: Directory\n",(int)(DirStart-OffsetBase), (int)(DirEnd+4-OffsetBase));
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/gpsinfo.c new/jhead-2.87/gpsinfo.c
--- old/jhead-2.84/gpsinfo.c 2008-10-04 18:10:35.000000000 +0200
+++ new/jhead-2.87/gpsinfo.c 2009-03-02 14:34:10.000000000 +0100
@@ -136,10 +136,11 @@
den = Get32s(ValuePtr+4+a*ComponentSize);
digits = 0;
- while (den > 1){
+ while (den > 1 && digits <= 6){
den = den / 10;
digits += 1;
}
+ if (digits > 6) digits = 6;
FmtString[1+a*7] = (char)('2'+digits+(digits ? 1 : 0));
FmtString[3+a*7] = (char)('0'+digits);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/jhead.1 new/jhead-2.87/jhead.1
--- old/jhead-2.84/jhead.1 1970-01-01 01:00:00.000000000 +0100
+++ new/jhead-2.87/jhead.1 2009-03-02 14:34:10.000000000 +0100
@@ -0,0 +1,423 @@
+.TH JHEAD 1 "02 Mar 2009" "jhead 2.87"
+.SH NAME
+jhead \- Digicam JPEG Exif header manipulation tool
+.SH SYNOPSIS
+.B jhead
+[
+.I options
+]
+[
+.I file\.\.\.
+]
+
+.LP
+.SH DESCRIPTION
+.LP
+.B jhead
+is used to display and manipulate data contained in the Exif header of JPEG
+images from digital cameras. By default, jhead displays the more useful
+camera settings from the file in a user-friendly format.
+.PP
+.B jhead
+can also be used to manipulate some aspects of the image relating to JPEG and
+Exif headers, such as changing the internal timestamps, removing the thumbnail,
+or transferring Exif headers back into edited images after graphical editors
+deleted the Exif header.
+.B jhead
+can also be used to launch other programs, similar in style to the UNIX
+.B find
+command, but much simpler.
+
+
+.SH GENERAL METADATA OPTIONS
+.TP
+.BI \-\^te \ file
+Transplant Exif header from a JPEG (with Exif header) in
+.I file
+into the image that is manipulated. This option is
+useful if you like to edit the photos but still want the Exif header on your photos.
+As most photo editing programs will wipe out the Exif header, this option can be used
+to re-copy them back from original copies after editing the photos.
+
+
+This feature has an interesting 'relative path' option for specifying the
+thumbnail name. Whenever the <name> contains the characters '&i',
+will substitute the original filename for this name. This allows creating a
+jhead 'relative name' when doing a whole batch of files. For example, the
+incantation:
+
+.B jhead -te "originals\&i" *.jpg
+
+would transfer the exif header for each .jpg file in the originals directory by
+the same name, Both Win32 and most Unix shells treat the '&' character in a
+special way, so you have to put quotes around that command line option for
+the '&' to even be passed to the program.
+
+.TP
+.B \-dc
+Delete comment field from the JPEG header. Note that the comment
+is not part of the Exif header.
+.TP
+.B \-de
+Delete the Exif header entirely. Leaves other metadata sections intact.
+.TP
+.B \-di
+Delete the IPTC section, if present. Leaves other metadata sections intact.
+.TP
+.B \-dx
+Delete the XMP section, if present. Leaves other metadata sections intact.
+.TP
+.B \-du
+Delete sections of jpeg that are not Exif, not comment, and otherwise not
+contributing to the image either - such as data that photoshop might leave in the image.
+.TP
+.B \-purejpg
+Delete all JPEG sections that aren't necessary for rendering the image. Strips any
+metadata that various applications may have left in the image. A combination of
+the -de -dc and -du options.
+.TP
+.B \-mkexif
+Creates minimal exif header. Exif header contains date/time, and empty thumbnail
+fields only. Date/time set to file time by default. Use with -rgt option if you
+want the exif header to contain a thumbnail. Note that exif header creation is
+very limited at this time, and no other fields can be added to the exif header
+this way.
+.TP
+.B \-ce
+Edit the JPEG header comment field (note, this comment field is outside the Exif structure
+and can be part of Exif and non Exif style JPEG images).
+
+A temporary file containing the comment is created and a text editor is launched to edit
+the file. The editor is specified in the EDITOR environment variable. If none is specified
+notepad or vi are used under Windows and Unix respectively. After the editor exits,
+the data is transferred back into the image, and the temporary file deleted.
+.TP
+.BI \-\^cs \ file
+Save comment section to a
+.I file
+.TP
+.BI \-\^ci \ file
+Replace comment with text from
+.I file
+.TP
+.BI \-\^cl \ string
+Replace comment with specified string from command line
+.IR file
+
+
+
+.SH DATE / TIME MANIPULATION OPTIONS
+
+.TP
+.B \-ft
+Sets the file's system time stamp to what is stored in the Exif header.
+.TP
+.B \-dsft
+Sets the Exif timestamp to the file's timestamp. Requires an Exif header to
+pre-exist. Use -mkexif option to create one if needed.
+.TP
+.BI \-\^n [format_string]
+This option causes files to be renamed using the date information from the Exif header
+"DateTimeOriginal" field.
+If the file is not an Exif file, or the DateTimeOriginal does not contain a valid value,
+the file date is used.
+Renaming is by default restricted to files whose names consist largely of digits.
+This effectively restricts renaming to files that have not already been manually renamed, as
+the default sequential names from digital cameras consist largely of digits.
+Use the
+.B -nf
+option to force renaming of all files.
+
+If the
+.I format_string
+is omitted, the file will be renamed to MMDD-HHMMSS. Note that
+this scheme doesn't include the year (I never have photos from different years together anyway).
+
+If a
+.I format_string
+is provided, it will be passed to the strftime function as the format string.
+In addition, if the format string contains '%f', this will
+substitute the original name of the file (minus extension). '%i' will substitute a sequence
+number. Leading zeros can be specified like with printf - i.e. '%04i' pads the number to 4
+digits using leading zeros.
+
+If the name includes '/', this is interpreted as a new path for the file.
+If the new path does not exist, the path will be created.
+
+If the target name already exists, the name will be appended with "a", "b", "c", etc,
+unless the name ends with a letter, in which case it will be appended with "0", "1", "2", etc.
+
+This feature is especially useful if more than one digital camera was used to take pictures
+of an event. By renaming them to a scheme according to date, they will automatically
+appear in order of taking in most directory listings and image browsers. Alternatively,
+if your image browser supports listing by file time, you can use the -ft option to set
+the file time to the time the photo was taken.
+
+Some of the more useful arguments for strftime are:
+
+.BR %H \ Hour\ in\ 24-hour\ format\ (00\ -\ 23)
+.br
+.BR %j \ Day\ of\ year\ as\ decimal\ number\ (001\ -\ 366)
+.br
+.BR %m \ Month\ as\ decimal\ number\ (01\ -\ 12)
+.br
+.BR %M \ Minute\ as\ decimal\ number\ (00\ -\ 59)
+.br
+.BR %S \ Second\ as\ decimal\ number\ (00\ -\ 59)
+.br
+.BR %w \ Weekday\ as\ decimal\ number\ (0\ -\ 6;\ Sunday\ is\ 0)
+.br
+.BR %y \ Year\ without\ century,\ as\ decimal\ number\ (00\ -\ 99)
+.br
+.BR %Y \ Year\ with\ century,\ as\ decimal\ number
+
+Example:
+
+.B jhead -n%Y%m%d-%H%M%S *.jpg
+This will rename files matched by *.jpg in the format YYYYMMDD-HHMMSS
+
+For a full listing of strftime arguments, look up the strftime in them man pages.
+Note that some arguments
+to the strftime function (not listed here) produce strings with characters such as ':' that
+may not be valid as part of a filename on some systems.
+
+.TP
+.B \-nf
+Same as '-n' but renames files regardless of original file name.
+
+
+.TP
+.B \-ta<+|-><timediff>
+Adjust time stored in the Exif header by h:mm backwards or forwards. Useful when having
+taken pictures with the wrong time set on the camera, such as after travelling across
+time zones, or when daylight savings time has changed.
+
+This option changes all Date/time fields in the exif header, including "DateTimeOriginal" (tag 0x9003)
+and "DateTimeDigitized" (tag 0x9004).
+.TP
+.B \-da<newdate>-<olddate>
+
+Works like -ta, but for specifying large date offsets, to be used when fixing dates from
+cameras where the date was set incorrectly, such as having date and time reset by battery
+removal on some cameras
+
+Because different months and years have different numbers of days in them, a simple offset
+for months, days, years would lead to unexpected results at times. The time offset is
+thus specified as a difference between two dates, so that jhead can figure out exactly
+how many days the timestamp needs to be adjusted by, including leap years and daylight
+savings time changes.
+The dates are specified as yyyy:mm:dd. For sub-day adjustments, a time of day can also
+be included, by specifying yyyy:nn:dd/hh:mm or yyyy:mm:dd/hh:mm:ss
+
+Examples:
+
+Year on camera was set to 2005 instead of 2004 for pictures taken in April
+.br
+jhead -da2004:03:01-2005:03:01
+
+Default camera date is 2002:01:01, and date was reset on 2005:05:29 at 11:21 am
+.br
+jhead -da2005:05:29/11:21-2002:01:01
+.TP
+.B \-ts
+Sets the time stored in the Exif header to what is specified on the command line.
+Time must be specified as:
+.I yyyy:mm:dd-hh:mm:ss
+.TP
+.B \-ds
+Sets the date stored in the Exif header to what is specified on the command line.
+Can be used to set date, just year and month, or just year.
+Date is specified as:
+.I yyyy:mm:dd, yyyy:mm, or yyyy
+
+
+.SH THUMBNAIL MANIPULATION OPTIONS
+
+.TP
+.B \-dt
+Delete thumbnails from the Exif header, but leave the
+interesting parts intact. This option truncates the thumbnail from the Exif header, provided
+that the thumbnail is the last part of the Exif header (which so far as I know is always the case).
+Exif headers have a built-in thumbnail, which typically
+occupies around 10k of space. This thumbnail is used by digital cameras. Windows XP may also
+use this thumbnail if present (but it doesn't need it). The
+thumbnails are too small to use even full screen on the digicam's LCD.
+I have not encountered any adverse side effects of deleting the thumbnails, even from the
+software provided with my old Olympus digicam. Use with caution.
+
+.TP
+.BI \-\^st \ file
+Save the integral thumbnail to
+.I file
+The thumbnail lives
+inside the Exif header, and is a very low-res JPEG image. Note that making
+any changes to a photo, except for with some programs, generally wipes out the Exif header
+and with it the thumbnail.
+
+The thumbnail is too low res to really use for very much.
+
+This feature has an interesting 'relative path' option for specifying the thumbnail name.
+Whenever the name for
+.I file
+contains the characters '&i',
+.B jhead
+will substitute the original
+filename for this name. This allows creating a 'relative name' when doing a whole
+batch of files. For example, the incantation:
+
+.B jhead -st "thumbnails/&i" *.jpg
+
+would create a thumbnail for each .jpg file in the thumbnails directory by the same name,
+(provided that the thumbnails directory exists, of course).
+Both Win32 and UNIX shells treat the '&'character in a special way, so you have to
+put quotes around that command line option for the '&' to even be passed to the program.
+
+If a '-' is specified for the output file, the thumbnail is sent to stdout. (UNIX build only)
+
+.TP
+.B \-rt
+Replace thumbnails from the Exif header.
+This only works if the exif header already contains a thumbnail, and the thumbnail is at the
+end of the header (both always the case if the photo came from a digital camera)
+.TP
+.BI \-\^rgt \ size
+Regenerate exif thumbnail. 'size' specifies maximum height or width of thumbnail.
+Relies on 'mogrify' program (from ImageMagick) to regenerate the thumbnail.
+This only works if the image already contains a thumbnail.
+
+.SH ROTATION OPTIONS
+.TP
+.B \-autorot
+Using the 'Orientation' tag of the Exif header, rotate the image so that it is upright.
+The program
+.B jpegtran
+is used to perform the rotation. This program is present in most
+Linux distributions. For windows, you need to get a copy of it. After rotation, the
+orientation tag of the Exif header is set to '1' (normal orientation). The thumbnail
+is also rotated. Other fields of the Exif header, including
+dimensions are untouched, but the JPEG height/width are adjusted.
+This feature is especially useful with newer Canon cameras, that set the orientation
+tag automatically using a gravity sensor.
+.TP
+.B \-norot
+Clears the rotation field in the Exif header without altering the image. Useful if
+the images were previously rotated without clearing the Exif rotation tag, as some
+image browsers will auto rotate images when the rotation tag is set.
+Sometimes, thumbnails and rotation tags can get very out of sync from manipulation
+with various tools. To reset it all use -norot with -rgt to clear this out.
+
+.SH OUTPUT VERBOSITY CONTROL
+.TP
+.B \-h
+Displays summary of command line options.
+.TP
+.B \-v
+Makes the program even more verbose than it already is. Like DOS programs, and unlike
+UNIX programs, Jhead gives feedback as to what it is doing, even when nothing goes wrong.
+Windows user that I am, when something doesn't give me feedback for 20 seconds, I assume
+its crashed.
+.TP
+.B \-q
+No output on success, more like Unix programs.
+.TP
+.B \-V
+Print version info and compilation date.
+.B \-exifmap
+Show a map of the bytes in the exif header. Useful when analyzing strange exif headers,
+not of much use to non software developers.
+.TP
+.B \-se
+Suppress error messages relating to corrupt Exif header structure.
+.TP
+.B \-c
+Concise output. This causes picture info to be summarized on one line instead of several.
+Useful for grep-ing through images, as well as importing into spread sheets (data is space
+delimited with quotes as text qualifier).
+
+.SH FILE MATCHING OPTIONS
+.TP
+.B \-model
+Restricts processing of files to those whose camera model, as indicated by the Exif image
+information, contains the substring specified in the argument after '-model'.
+For example, the following command will list only images that are from an S100 camera:
+
+.B jhead -model S100 *.jpg
+
+.B jhead -model S100 *.jpg
+
+I use this option to restrict my JPEG recompensing to those images that came from my
+Canon S100 digicam, (see the -cmd option).
+.TP
+.B \-exonly
+Skip all files that don't have an Exif header. Photos straight from a digital camera
+have an Exif header, whereas many photo manipulation tools discard the Exif header.
+.TP
+.B \-cmd
+Executes the specified command on each JPEG file to be processed.
+
+The Exif section of each file is read before running the command, and reinserted
+after the command finishes.
+
+The specified command invoked separately for each JPEG that is processed, even if
+multiple files are specified (explicitly or by wild card).
+I use this option to process whole directory trees of JPEGs from my digital camera
+with jpegtran (Independent JPEG group) and ImageMagick's 'mogrify(1)' command without
+loosing the camera settings and other info stored in the Exif headers.
+
+jpegtran is useful for lossless rotation, as well as for converting JPEGs to
+progressive JPEGs (also a lossless process, but results in typically 5% smaller files)
+I use mogrify for re-compressing the images I get from my Canon PowerShot S100 to
+80% quality. The Canon JPEGs are either way too 'high quality' for the resolution, or
+are suboptimally encoded. Using mogrify to 80% produces no detectable loss in quality,
+with files about half the size.
+
+Example use:
+
+Having a whole directory tree of photos from my S100, I run the following commands:
+
+.B jhead -cmd "mogrify -quality 80 &i" -model S100 -r *.jpg
+.br
+.B jhead -cmd "jpegtran -progressive &i > &o" -r *.jpg
+
+The first command mogrifies all JPEGs in the tree that indicate that they are from a
+Canon S100 in their Exif header to 80% quality at the same resolution. This is a 'lossy'
+process, so I only run it on files that are from the Canon, and only run it once.
+The next command then takes a JPEGs and converts them to progressive JPEGs. The result
+is the same images, with no discernible differences, stored in half the space. This only
+produces substantial savings on some cameras, such as the Canon S100. The newer S110 and S300
+cameras are smarter about how they compress JPEG images, so re-mogrifying them may not give
+you any savings unless you crank the quality way down. However, turning them into progressive
+JPEG images is a lossless process that typically makes image files 5% smaller.
+
+Keeping the Exif header information is important to me, as I like to check things like the
+shutter speed for some of my photos, and my HTML index generating program uses the Exif tags
+to display the JPEG images in order of taking.
+
+.SH SEE ALSO
+.BR jpegtran (1),
+.BR mogrify (1),
+.BR rdjpgcom (1),
+.BR wrjpgcom (1)
+.SH AUTHOR
+Matthias Wandel
+.SH BUGS
+After jhead runs a program to rotate or resize an image, the image dimensions and thumbnail
+in the Exif header are not adjusted.
+.PP
+Modifying of Exif header data is very limited, as Jhead internally only has a read only
+implementation of the file system contained in the Exif header. For example, there is no way
+to replace the thumbnail or edit the Exif comment in the Exif header. There is also no way
+to create minimal exif headers.
+.PP
+Some Canon digital SLR cameras fail to adjust the effective sensor resolution when shooting at less
+than full resolution, causing jhead to incorrectly miscalculate the sensor width and 35mm equivalent
+focal length. The same can result from resizing photos with Photoshop, which will manipulate
+parts of the exif header.
+This is often reported as a bug in Jhead, but Jhead can't do much about incorrect data.
+.PP
+Send bug reports to mwandel at sentex dot net.
+
+.SH COPYING PERMISSIONS
+Jhead is 'public domain'. You may freely copy jhead, and reuse part or all of its code
+in free or proprietary programs. I do however request that you do not post my e-mail
+address in ways that spam robots can harvest it.
Files old/jhead-2.84/jhead.1.gz and new/jhead-2.87/jhead.1.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/jhead.c new/jhead-2.87/jhead.c
--- old/jhead-2.84/jhead.c 2008-10-04 18:10:35.000000000 +0200
+++ new/jhead-2.87/jhead.c 2009-03-02 14:34:10.000000000 +0100
@@ -2,12 +2,12 @@
// Program to pull the information out of various types of EXIF digital
// camera files and show it in a reasonably consistent way
//
-// Version 2.84
+// Version 2.86
//
// Compiling under Windows:
// Make sure you have Microsoft's compiler on the path, then run make.bat
//
-// Dec 1999 - Oct 2008
+// Dec 1999 - Mar 2009
//
// by Matthias Wandel www.sentex.net/~mwandel
//--------------------------------------------------------------------------
@@ -15,7 +15,7 @@
#include
-#define JHEAD_VERSION "2.84"
+#define JHEAD_VERSION "2.87"
// This #define turns on features that are too very specific to
// how I organize my photos. Best to ignore everything inside #ifdef MATTHIAS
@@ -35,8 +35,10 @@
//--------------------------------------------------------------------------
// Command line options flags
static int TrimExif = FALSE; // Cut off exif beyond interesting data.
-static int RenameToDate = FALSE;
+static int RenameToDate = 0; // 1=rename, 2=rename all.
+#ifdef _WIN32
static int RenameAssociatedFiles = FALSE;
+#endif
static char * strftime_args = NULL; // Format for new file name.
static int Exif2FileTime = FALSE;
static int DoModify = FALSE;
@@ -86,7 +88,6 @@
// (file name, file size, file date)
-
#ifdef MATTHIAS
// This #ifdef to take out less than elegant stuff for editing
// the comments in a JPEG. The programs rdjpgcom and wrjpgcom
@@ -145,7 +146,6 @@
{
char * Editor;
Editor = getenv("EDITOR");
- if (strlen(Editor) > PATH_MAX) ErrFatal("env too long");
if (Editor == NULL){
#ifdef _WIN32
Editor = "notepad";
@@ -153,11 +153,12 @@
Editor = "vi";
#endif
}
+ if (strlen(Editor) > PATH_MAX) ErrFatal("env too long");
sprintf(QuotedPath, "%s \"%s\"",Editor, TempFileName);
a = system(QuotedPath);
}
-
+
if (a != 0){
perror("Editor failed to launch");
exit(-1);
@@ -295,37 +296,82 @@
//--------------------------------------------------------------------------
+// Escape an argument such that it is interpreted literally by the shell
+// (returns the number of written characters)
+//--------------------------------------------------------------------------
+static int shellescape(char* to, const char* from)
+{
+ int i, j;
+ i = j = 0;
+
+ // Enclosing characters in double quotes preserves the literal value of
+ // all characters within the quotes, with the exception of $, `, and \.
+ to[j++] = '"';
+ while(from[i])
+ {
+#ifdef _WIN32
+ // Under WIN32, there isn't really anything dangerous you can do with
+ // escape characters, plus windows users aren't as sercurity paranoid.
+ // Hence, no need to do fancy escaping.
+ to[j++] = from[i++];
+#else
+ switch(from[i]) {
+ case '"':
+ case '$':
+ case '`':
+ case '\\':
+ to[j++] = '\\';
+ // Fallthru...
+ default:
+ to[j++] = from[i++];
+ }
+#endif
+ if (j >= PATH_MAX) ErrFatal("max path exceeded");
+ }
+ to[j++] = '"';
+ return j;
+}
+
+
+//--------------------------------------------------------------------------
// Apply the specified command to the JPEG file.
//--------------------------------------------------------------------------
static void DoCommand(const char * FileName, int ShowIt)
{
int a,e;
- char ExecString[PATH_MAX*2];
- char TempName[PATH_MAX+1];
+ char ExecString[PATH_MAX*3];
+ char TempName[PATH_MAX+10];
int TempUsed = FALSE;
e = 0;
- // Make a temporary file in the destination directory by changing last char.
- strcpy(TempName, FileName);
- a = strlen(TempName)-1;
- TempName[a] = (char)(TempName[a] == 't' ? 'z' : 't');
+ // Generate an unused temporary file name in the destination directory
+ // (a is the number of characters to copy from FileName)
+ a = strlen(FileName)-1;
+ while(a > 0 && FileName[a-1] != SLASH) a--;
+ memcpy(TempName, FileName, a);
+ strcpy(TempName+a, "XXXXXX");
+ mktemp(TempName);
+ if(!TempName[0]) {
+ ErrFatal("Cannot find available temporary file name");
+ }
+
+
// Build the exec string. &i and &o in the exec string get replaced by input and output files.
for (a=0;;a++){
if (ApplyCommand[a] == '&'){
if (ApplyCommand[a+1] == 'i'){
// Input file.
- e += sprintf(ExecString+e, "\"%s\"",FileName);
+ e += shellescape(ExecString+e, FileName);
a += 1;
continue;
}
if (ApplyCommand[a+1] == 'o'){
// Needs an output file distinct from the input file.
- e += sprintf(ExecString+e, "\"%s\"",TempName);
+ e += shellescape(ExecString+e, TempName);
a += 1;
TempUsed = TRUE;
- unlink(TempName);// Remove any pre-existing temp file
continue;
}
}
@@ -436,7 +482,7 @@
FilePattern[ExtPos] = '*';
FilePattern[ExtPos+1] = '\0';
- for(PathLen = strlen(FileName);FileName[PathLen-1] != '\\';){
+ for(PathLen = strlen(FileName);FileName[PathLen-1] != SLASH;){
if (--PathLen == 0) break;
}
@@ -478,15 +524,17 @@
{
int NumAlpha = 0;
int NumDigit = 0;
- int PrefixPart = 0;
- int ExtensionPart = strlen(FileName);
+ int PrefixPart = 0; // Where the actual filename starts.
+ int ExtensionPart; // Where the file extension starts.
int a;
struct tm tm;
char NewBaseName[PATH_MAX*2];
int AddLetter = 0;
+ char NewName[PATH_MAX+2];
+ ExtensionPart = strlen(FileName);
for (a=0;FileName[a];a++){
- if (FileName[a] == '/' || FileName[a] == '\\'){
+ if (FileName[a] == SLASH){
// Don't count path component.
NumAlpha = 0;
NumDigit = 0;
@@ -513,7 +561,7 @@
}
- strcpy(NewBaseName, FileName); // Get path component of name.
+ strncpy(NewBaseName, FileName, PATH_MAX); // Get path component of name.
if (strftime_args){
// Complicated scheme for flexibility. Just pass the args to strftime.
@@ -566,14 +614,16 @@
}
}
}
-
- strftime(NewBaseName+PrefixPart, PATH_MAX, pattern, &tm);
+ strftime(NewName, PATH_MAX, pattern, &tm);
}else{
// My favourite scheme.
- sprintf(NewBaseName+PrefixPart, "%02d%02d-%02d%02d%02d",
+ sprintf(NewName, "%02d%02d-%02d%02d%02d",
tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
}
+ NewBaseName[PrefixPart] = 0;
+ CatPath(NewBaseName, NewName);
+
AddLetter = isdigit(NewBaseName[strlen(NewBaseName)-1]);
for (a=0;;a++){
char NewName[PATH_MAX+10];
@@ -587,9 +637,9 @@
// is before the '.' in ascii, and so sorting the names would put the later name before
// the name without suffix, causing the pictures to more likely be out of order.
if (AddLetter){
- NameExtra[0] = (char)('a'-1+a); // Try a,b,c,d... for suffix if it ends in a letter.
+ NameExtra[0] = (char)('a'-1+a); // Try a,b,c,d... for suffix if it ends in a number.
}else{
- NameExtra[0] = (char)('0'-1+a); // Try 1,2,3,4... for suffix if it ends in a char.
+ NameExtra[0] = (char)('0'-1+a); // Try 0,1,2,3... for suffix if it ends in a latter.
}
NameExtra[1] = 0;
}else{
@@ -600,6 +650,11 @@
if (!strcmp(FileName, NewName)) break; // Skip if its already this name.
+ if (!EnsurePathExists(NewBaseName)){
+ break;
+ }
+
+
if (stat(NewName, &dummy)){
// This name does not pre-exist.
if (rename(FileName, NewName) == 0){
@@ -614,6 +669,7 @@
printf("Error: Couldn't rename '%s' to '%s'\n",FileName, NewName);
}
break;
+
}
if (a > 25 || (!AddLetter && a > 9)){
@@ -638,7 +694,7 @@
ErrFatal("Orientation screwup");
}
- sprintf(RotateCommand, "jpegtran -%s -outfile &o &i", Argument);
+ sprintf(RotateCommand, "jpegtran -trim -%s -outfile &o &i", Argument);
ApplyCommand = RotateCommand;
DoCommand(FileName, FALSE);
ApplyCommand = NULL;
@@ -657,7 +713,7 @@
strcpy(ThumbTempName_out, FileName);
strcat(ThumbTempName_out, ".tho");
SaveThumbnail(ThumbTempName_in);
- sprintf(RotateCommand,"jpegtran -%s -outfile \"%s\" \"%s\"",
+ sprintf(RotateCommand,"jpegtran -trim -%s -outfile \"%s\" \"%s\"",
Argument, ThumbTempName_out, ThumbTempName_in);
if (system(RotateCommand) == 0){
@@ -1143,7 +1199,7 @@
static void Usage (void)
{
printf("Jhead is a program for manipulating settings and thumnails in Exif jpeg headers\n"
- "used by most Digital Cameras. v"JHEAD_VERSION" Matthias Wandel, Oct 4 2008.\n"
+ "used by most Digital Cameras. v"JHEAD_VERSION" Matthias Wandel, Mar 02 2009.\n"
"http://www.sentex.net/~mwandel/jhead\n"
"\n");
@@ -1188,6 +1244,8 @@
" The '.jpg' is automatically added to the end of the name. If the\n"
" destination name already exists, a letter or digit is added to \n"
" the end of the name to make it unique.\n"
+ " The new name may include a path as part of the name. If this path\n"
+ " does not exist, it will be created\n"
" -nf[format-string]\n"
" Same as -n, but rename regardless of original name\n"
" -a (Windows only) Rename files with same name but different extension\n"
@@ -1436,13 +1494,17 @@
if (*arg){
// A strftime format string is supplied.
strftime_args = arg;
+ #ifdef _WIN32
+ SlashToNative(strftime_args);
+ #endif
//printf("strftime_args = %s\n",arg);
}
}else if (!strcmp(arg,"-a")){
- RenameAssociatedFiles = TRUE;
#ifndef _WIN32
ErrFatal("Error: -a only supported in Windows version");
- #endif
+ #else
+ RenameAssociatedFiles = TRUE;
+ #endif
}else if (!strcmp(arg,"-ft")){
Exif2FileTime = TRUE;
DoReadAction = TRUE;
@@ -1602,13 +1664,7 @@
FilesMatched = FALSE;
#ifdef _WIN32
- {
- int a;
- for (a=0;;a++){
- if (argv[argn][a] == '\0') break;
- if (argv[argn][a] == '/') argv[argn][a] = '\\';
- }
- }
+ SlashToNative(argv[argn]);
// Use my globbing module to do fancier wildcard expansion with recursive
// subdirectories under Windows.
MyGlob(argv[argn], ProcessFile);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/jhead.h new/jhead-2.87/jhead.h
--- old/jhead-2.84/jhead.h 2008-10-04 18:10:35.000000000 +0200
+++ new/jhead-2.87/jhead.h 2009-03-02 14:34:10.000000000 +0100
@@ -39,8 +39,12 @@
#ifdef _WIN32
#define PATH_MAX _MAX_PATH
+ #define SLASH '\\'
+#else
+ #define SLASH '/'
#endif
+
//--------------------------------------------------------------------------
// This structure is used to store jpeg file sections in memory.
typedef struct {
@@ -172,7 +176,14 @@
void ShowXmp(Section_t XmpSection);
// Prototypes for myglob.c module
-extern void MyGlob(const char * Pattern , void (*FileFuncParm)(const char * FileName));
+#ifdef _WIN32
+void MyGlob(const char * Pattern , void (*FileFuncParm)(const char * FileName));
+void SlashToNative(char * Path);
+#endif
+
+// Prototypes for paths.c module
+int EnsurePathExists(const char * FileName);
+void CatPath(char * BasePath, const char * FilePath);
// Prototypes from jpgfile.c
int ReadJpegSections (FILE * infile, ReadMode_t ReadMode);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/jhead.spec new/jhead-2.87/jhead.spec
--- old/jhead-2.84/jhead.spec 1970-01-01 01:00:00.000000000 +0100
+++ new/jhead-2.87/jhead.spec 2009-03-02 14:34:10.000000000 +0100
@@ -0,0 +1,140 @@
+# -----------------------------------------------------
+# Define static values
+# -----------------------------------------------------
+
+# -----------------------------------------------------
+# Define requirements for configure, BuildRequire,
+# Require and so on (depending on macros)
+# -----------------------------------------------------
+
+# -----------------------------------------------------
+# RPM-Information
+# -----------------------------------------------------
+Name: jhead
+Summary: Tool for handling EXIF metadata in JPEG image files
+
+Version: 2.87
+Release: 0
+
+Group: Libraries
+License: Public Domain
+URL: http://www.sentex.net/~mwandel/jhead/
+
+Source: http://www.sentex.net/~mwandel/jhead/%{name}-%{version}.tar.gz
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: glibc-devel
+
+# -----------------------------------------------------
+# Package-Information (for main package)
+# -----------------------------------------------------
+%description
+This package provides a tool for displaying and manipulating non-image
+portions of EXIF format JPEG image files, as produced by most digital cameras.
+
+# -----------------------------------------------------
+# Prepare-Section
+# -----------------------------------------------------
+%prep
+%setup -q
+
+# -----------------------------------------------------
+# Build-Section
+# -----------------------------------------------------
+%build
+make %{?_smp_mflags}
+
+# -----------------------------------------------------
+# Install-Section
+# -----------------------------------------------------
+%install
+mkdir -p %{buildroot}%{_bindir}
+cp jhead %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_mandir}/man1/
+cp jhead.1.gz %{buildroot}%{_mandir}/man1/
+
+# -----------------------------------------------------
+# Clean-Section
+# -----------------------------------------------------
+%clean
+rm -rf %{buildroot}
+
+# -----------------------------------------------------
+# Files-Section (for main package)
+# -----------------------------------------------------
+%files
+%defattr(0644,root,root,0755)
+%attr(0755,root,root) %{_bindir}/*
+%doc readme.txt usage.html
+%{_mandir}/man1/jhead.1.gz
+
+# -----------------------------------------------------
+# Changelog-Section
+# -----------------------------------------------------
+%changelog
+
+* Sat Feb 14 2009 - 2.86
+- Added ability to move files around with the -n command
+- Various minor bugfixes and maintenance changes
+
+* Mon Oct 4 2008 - 2.84
+- decode more exif tags in -v mode
+- Fix gpsinfo altitude bug
+- Fix several potential stirng overflows
+
+* Thu Apr 03 2008 - 2.82
+- No longer delete XMP section on some operations
+- Improve IPTC display
+- Minor tweaks and cleanups
+
+* Tue Nov 13 2007 - 2.8
+- Limited IPTC handling
+- Added -q option
+- Fix handling of corrupted GPS directory.
+- Extract focus distance from canon makernote.
+- Extract subject range (pentax and fuji cameras)
+
+* Thu Jan 11 2007 - 2.7
+- Release version 2.7
+
+* Sat Apr 29 2006 - 2.6
+- Release version 2.6
+
+* Sun Jan 08 2006 - 2.5
+- Release version 2.5
+
+* Thu Jun 10 2005 - 2.4-2
+- Minor fixups.
+
+* Sun May 29 2005 - 2.4
+- Display gps info
+- Added -da optino for large date adjust
+- Fix time reference bug for -ta option
+- Fix crashes with some corrupt jpeg files
+
+* Mon Jan 03 2005 - 2.4
+- Handle readonly files better
+- Handle more strange jpegs
+- added 'purejpg' option
+- Display digital zoom ratio
+
+* Sun Jun 20 2004 - 2.2-0
+- Various bug and spelling fixes.
+- added ability to do sequential renaming
+
+* Tue Jan 08 2004 Matthias Wandel - 2.1-0
+- Bumped version number to 2.1 for new jhead release.
+- Added -cl feature
+- added -noroot feature
+
+* Tue Jun 03 2003 Oliver Pitzeier - 2.0-3
+- Specfile cleanup/beautifying
+- Use _smp_mflags within make
+- Add versions to the changelog entries
+
+* Mon Apr 14 2003 Matthias Wandel - 2.0-2
+- First jhead 2.0 RPM built by me.
+- Finally wrote a nice man page for jhead
+- Using jhead 1.9 RPM from connectiva linux as starting point (left in the portugese tags)
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/jpgfile.c new/jhead-2.87/jpgfile.c
--- old/jhead-2.84/jpgfile.c 2008-10-04 18:10:35.000000000 +0200
+++ new/jhead-2.87/jpgfile.c 2009-03-02 14:34:10.000000000 +0100
@@ -134,11 +134,11 @@
CheckSectionsAllocated();
- for (a=0;a<7;a++){
+ for (a=0;a<=16;a++){
marker = fgetc(infile);
if (marker != 0xff) break;
- if (a >= 32){
+ if (a >= 16){
fprintf(stderr,"too many padding bytes\n");
return FALSE;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/makefile new/jhead-2.87/makefile
--- old/jhead-2.84/makefile 2008-10-04 18:10:35.000000000 +0200
+++ new/jhead-2.87/makefile 2009-03-02 14:34:10.000000000 +0100
@@ -3,14 +3,21 @@
#--------------------------------
OBJ=.
SRC=.
-CFLAGS?= -O3
+CFLAGS= -O3 -Wall
all: jhead
-objs = $(OBJ)/jhead.o $(OBJ)/jpgfile.o $(OBJ)/exif.o $(OBJ)/iptc.o $(OBJ)/gpsinfo.o $(OBJ)/makernote.o
+objs = $(OBJ)/jhead.o $(OBJ)/jpgfile.o $(OBJ)/paths.o \
+ $(OBJ)/exif.o $(OBJ)/iptc.o $(OBJ)/gpsinfo.o $(OBJ)/makernote.o
$(OBJ)/%.o:$(SRC)/%.c
- ${CC} $(CFLAGS) -Wall -c $< -o $@
+ ${CC} $(CFLAGS) -c $< -o $@
jhead: $(objs) jhead.h
${CC} -o jhead $(objs) -lm
+
+clean:
+ rm -f $(objs) jhead
+
+install:
+ cp jhead ${DESTDIR}/usr/bin/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/makefile-win32 new/jhead-2.87/makefile-win32
--- old/jhead-2.84/makefile-win32 2008-10-04 18:10:34.000000000 +0200
+++ new/jhead-2.87/makefile-win32 2009-03-02 14:34:10.000000000 +0100
@@ -14,6 +14,7 @@
OBJECTS_JHEAD = $(OBJ)\jhead.obj \
$(OBJ)\jpgfile.obj \
$(OBJ)\myglob.obj \
+ $(OBJ)\paths.obj \
$(OBJ)\exif.obj \
$(OBJ)\iptc.obj \
$(OBJ)\gpsinfo.obj \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/makernote.c new/jhead-2.87/makernote.c
--- old/jhead-2.84/makernote.c 2008-10-04 18:10:35.000000000 +0200
+++ new/jhead-2.87/makernote.c 2009-03-02 14:34:10.000000000 +0100
@@ -26,7 +26,7 @@
}
if (DumpExifMap){
- printf("Map: %05d-%05d: Directory (makernote)\n",DirStart-OffsetBase, DirEnd-OffsetBase);
+ printf("Map: %05d-%05d: Directory (makernote)\n",(int)(DirStart-OffsetBase), (int)(DirEnd-OffsetBase));
}
}
@@ -136,7 +136,7 @@
}
}
if (Components > 19 && ImageInfo.Distance <= 0) {
- // Inidcates the distance the autofocus camera is focused to.
+ // Indicates the distance the autofocus camera is focused to.
// Tends to be less accurate as distance increases.
int temp_dist = Get16u(ValuePtr + 19*sizeof(unsigned short));
if (temp_dist != 65535){
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/myglob.c new/jhead-2.87/myglob.c
--- old/jhead-2.84/myglob.c 2008-10-04 18:10:35.000000000 +0200
+++ new/jhead-2.87/myglob.c 2009-03-02 14:34:10.000000000 +0100
@@ -15,7 +15,7 @@
#include
#include
#include
-
+#include "jhead.h"
#define TRUE 1
#define FALSE 0
@@ -41,7 +41,7 @@
//--------------------------------------------------------------------------------
// Simple path splicing (assumes no '\' in either part)
//--------------------------------------------------------------------------------
-static void CatPath(char * dest, const char * p1, const char * p2)
+static void SplicePath(char * dest, const char * p1, const char * p2)
{
int l;
l = strlen(p1);
@@ -203,14 +203,14 @@
if (FileList[a].attrib & _A_SUBDIR){
if (MatchDirs){
// Need more directories.
- CatPath(CombinedName, BasePattern, FileList[a].Name);
+ SplicePath(CombinedName, BasePattern, FileList[a].Name);
strncat(CombinedName, PatCopy+PatternEnd, _MAX_PATH*2-strlen(CombinedName));
MyGlob(CombinedName,FileFuncParm);
}
}else{
if (MatchFiles){
// We need files at this level.
- CatPath(CombinedName, BasePattern, FileList[a].Name);
+ SplicePath(CombinedName, BasePattern, FileList[a].Name);
FileFuncParm(CombinedName);
}
}
@@ -235,6 +235,18 @@
}
}
+//--------------------------------------------------------------------------------
+// Flip slashes to native OS representation (for Windows)
+//--------------------------------------------------------------------------------
+void SlashToNative(char * Path)
+{
+ int a;
+ for (a=0;Path[a];a++){
+ if (Path[a] == '/') Path[a] = SLASH;
+ }
+}
+
+
#ifdef DEBUGGING
//--------------------------------------------------------------------------------
// The main program.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/paths.c new/jhead-2.87/paths.c
--- old/jhead-2.84/paths.c 1970-01-01 01:00:00.000000000 +0100
+++ new/jhead-2.87/paths.c 2009-03-02 14:34:10.000000000 +0100
@@ -0,0 +1,140 @@
+//--------------------------------------------------------------------------------
+// Module to do path manipulation for file moving of jhead.
+//
+// Matthias Wandel Feb 2 2009
+//--------------------------------------------------------------------------------
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#ifdef _WIN32
+ #include // for mkdir under windows.
+ #define mkdir(dir,mode) mkdir(dir)
+ #define S_ISDIR(a) (a & _S_IFDIR)
+#endif
+
+#include "jhead.h"
+
+//--------------------------------------------------------------------------------
+// Ensure that a path exists
+//--------------------------------------------------------------------------------
+int EnsurePathExists(const char * FileName)
+{
+ char NewPath[PATH_MAX*2];
+ int a;
+ int LastSlash = 0;
+
+ //printf("\nEnsure exists:%s\n",FileName);
+
+ // Extract the path component of the file name.
+ strcpy(NewPath, FileName);
+ a = strlen(NewPath);
+ for (;;){
+ a--;
+ if (a == 0){
+ NewPath[0] = 0;
+ break;
+ }
+ if (NewPath[a] == SLASH){
+ struct stat dummy;
+ NewPath[a] = 0;
+ if (stat(NewPath, &dummy) == 0){
+ if (S_ISDIR(dummy.st_mode)){
+ // Break out of loop, and go forward along path making
+ // the directories.
+ if (LastSlash == 0){
+ // Full path exists. No need to create any directories.
+ return 1;
+ }
+ break;
+ }else{
+ // Its a file.
+ fprintf(stderr,"Can't create path '%s' due to file conflict\n",NewPath);
+ return 0;
+ }
+ }
+ if (LastSlash == 0) LastSlash = a;
+ }
+ }
+
+ // Now work forward.
+ //printf("Existing First dir: '%s' a = %d\n",NewPath,a);
+
+ for(;FileName[a];a++){
+ if (FileName[a] == SLASH || a == 0){
+ if (a == LastSlash) break;
+ NewPath[a] = FileName[a];
+ //printf("make dir '%s'\n",NewPath);
+ #ifdef _WIN32
+ if (NewPath[1] == ':' && strlen(NewPath) == 2) continue;
+ #endif
+ if (mkdir(NewPath,0777)){
+ fprintf(stderr,"Could not create directory '%s'\n",NewPath);
+ // Failed to create directory.
+ return 0;
+ }
+ }
+ }
+ return 1;
+}
+
+//--------------------------------------------------------------------------------
+// Make a new path out of a base path, and a filename.
+// Basepath is the base path, and FilePath is a filename, or path + filename.
+//--------------------------------------------------------------------------------
+void CatPath(char * BasePath, const char * FilePath)
+{
+ int l;
+ l = strlen(BasePath);
+
+ if (FilePath[1] == ':'){
+ // Its a windows absolute path.
+ l = 0;
+ }
+
+ if (FilePath[0] == SLASH || FilePath[0] == '.' || l == 0){
+ // Its an absolute path, or there was no base path.
+ strcpy(BasePath, FilePath);
+ return;
+ }
+
+ if (BasePath[l-1] != SLASH){
+ BasePath[l++] = SLASH;
+ BasePath[l] = 0;
+ }
+
+ strcat(BasePath, FilePath);
+
+ // Note that the combined path may contains things like "foo/../bar". We assume
+ // that the filesystem will take care of these.
+}
+
+/*
+
+char Path1[] = "ztest\\cdir\\foo.jpg";
+char Path2[] = "zxtest\\cdir\\foo.jpg";
+char Path3[] = "\\tzest\\cdir\\foo.jpg";
+
+char BasePath[100];
+
+main()
+{
+ EnsurePathExists(Path1);
+ EnsurePathExists(Path2);
+ EnsurePathExists(Path3);
+
+
+
+
+ CatPath(BasePath, "hello.txt");
+ CatPath(BasePath, "world\\hello.txt");
+ CatPath(BasePath, "\\hello.txt");
+ CatPath(BasePath, "c:\\hello.txt");
+ CatPath(BasePath, "c:\\world\\hello.txt");
+ CatPath(BasePath, "c:\\abresl\\hello.txt");
+
+}
+*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jhead-2.84/usage.html new/jhead-2.87/usage.html
--- old/jhead-2.84/usage.html 2008-10-04 18:10:35.000000000 +0200
+++ new/jhead-2.87/usage.html 2009-03-02 14:34:10.000000000 +0100
@@ -8,7 +8,7 @@
or Mac OS-X won't do anything for you - you have to <b>use it from the Command prompt</b>
(or DOS prompt under Win9x)
-<h3>Jhead v2.84 program Features</h3>
+<h3>Jhead v2.87 program Features</h3>
<ul>
<li>Extracting camera settings from Exif image files
<li>Able to set and/or adjust the Exif time field
@@ -117,6 +117,9 @@
strftime function for formatting. In addition, if the format string contains '%f', this will
substitute the original name of the file (minus extension).
<br>
+ If the name includes '/' or '\' (under windows), this is interpreted as a new path for
+ the file. If the new path does not exist, the path will be created.
+ <br>
A sequence number may also be included by including '%i' in the format string. Leading
zeros can be specified. '%03i' for example will pad the numbers to '001', '002'...
this works just like printf in C, but with '%i' instead of '%d'.
@@ -126,8 +129,8 @@
<br>
This feature is especially useful if more than one digital camera was used to take pictures
of an event. By renaming them to a scheme according to date, they will automatically
- appear in order of taking when viewed with some sort of viewer like Compupic or AcdSee, and
- sorted by name. Or you could use the -ft option and sort by date.
+ appear in order of taking when viewed with some sort of viewer like Xnview or AcdSee, and
+ sorted by name. Or you could use the -ft option and view the images sorted by date.
<p>
<b>Some of the more useful arguments for strftime are:</b>
@@ -195,7 +198,7 @@
how many days the timestamp needs to be adjusted by, including leap years and daylight
savings time changes.
The dates are specified as yyyy:mm:dd. For sub-day adjustments, a time of day can also
- be included, by specifying yyyy:nn:dd+hh:mm or yyyy:mm:dd+hh:mm:ss
+ be included, by specifying yyyy:nn:dd/hh:mm or yyyy:mm:dd/hh:mm:ss
<p>
Examples:<br>
Year on camera was set to 2005 instead of 2004 for pictures taken in April
@@ -495,6 +498,6 @@
</ul>
<p><br>
Jhead homeage: <a href="http://www.sentex.net/~mwandel/jhead">http://www.sentex.net/~mwandel/jhead</a><br>
-Last Updateed: Oct 4 2008
+Last Updateed: Mar 02 2009
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org