diff options
author | Andy Shevchenko <andy@smile.org.ua> | 2006-05-21 19:01:46 +0000 |
---|---|---|
committer | Andy Shevchenko <andy@smile.org.ua> | 2006-05-21 19:01:46 +0000 |
commit | 54fa5b6b4a1d6ace2b6722176cd3baa4717ff66d (patch) | |
tree | d5eaa4bdf94a3603344d761e78efadfcc1fdf15d | |
parent | 41846c73e6b6628b62178b7053c605c3c65d7c3e (diff) | |
download | renrot-54fa5b6b4a1d6ace2b6722176cd3baa4717ff66d.tar.gz renrot-54fa5b6b4a1d6ace2b6722176cd3baa4717ff66d.tar.bz2 |
Write more explanation of Orientation tag rotation in README and manual.
Add new restriction to related section of README. Also fix TODO according last changes.
The --aggr-dir option alias is removed.
Now 180 degree is approved to use at --rotate-angle or --rotate-thumb options.
git-svn-id: file:///svnroot/renrot/trunk@136 fe2816f4-e837-0410-b10a-f608c9d244a1
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | README | 12 | ||||
-rw-r--r-- | TODO | 4 | ||||
-rwxr-xr-x | renrot | 33 |
5 files changed, 41 insertions, 23 deletions
@@ -1,4 +1,10 @@ $Log$ +Revision 1.89 2006/05/21 19:01:46 andy +Write more explanation of Orientation tag rotation in README and manual. +Add new restriction to related section of README. Also fix TODO according last changes. +The --aggr-dir option alias is removed. +Now 180 degree is approved to use at --rotate-angle or --rotate-thumb options. + Revision 1.88 2006/05/21 11:17:21 andy Release as 0.19.3 (bugfix). @@ -354,3 +360,4 @@ Id keyword is added to renrot file. Revision 1.1 2005/10/17 13:39:38 zeus ChangeLog file is added. Its the very begining. + @@ -1,9 +1,9 @@ * 0.19.3 * -The bug when rotating file name contains special symbols was fixed. Now the -empty --extension argument is no available. A small optimization has been -implemented. No attempt to process the absent files. The smart Orientation tag -rotation is implemented for rotation process. +The bug which occurred when rotating filenames containing special symbols has +been fixed. The empty --extension argument is no longer available. A small +optimization has been implemented. No attempt is made to process absent files. +Smart Orientation tag rotation has been implemented for the rotation process. * 0.19.2 * @@ -44,6 +44,7 @@ namely RenRot? Because: libjpeg6 (the best open tool to operate JPEG format files, to correctly rotate both, the very file and the thumbnail inside it); - it has very much flex file naming and aggregation template engines; + - it uses original algorithm of smart Orientation tag rotation; - it works in batch mode. @@ -71,7 +72,7 @@ the script: rotate each file and their thumbnail by 90CW in specified directory renrot --rotate-angle 90 --work-directory="/tmp/images" --extension jpg - rotate thumbnails, included to EXIF, for each file by 90CCW + rotate thumbnails, included to EXIF, for each file by 270CW (same as 90CCW) renrot --rotate-thumb 270 --extension jpg fix file mtime according to its EXIF tags or current time stamp, when tags @@ -88,10 +89,11 @@ the script: RESTRICTIONS RenRot has some restrictions at runtime. First off, script handles a whole -directory without recursion and only with one extension of files. -Second, algorithm treat each file with given extension as the image. -Otherwise, file will be renamed to the current time stamp when --no-rename -option is omitted. +directory without recursion and only with one extension of files. Second, +algorithm treat each file with given extension as the image. Otherwise, file +will be renamed to the current time stamp when --no-rename option is omitted. +Third, rename operation is not permited between different partitions due to +hard link technology used (this will be avoided in future). DEBUGGING @@ -17,7 +17,7 @@ q to write to some tag the options passed to renrot q to implement %t in name template, where the array of desired tags will be inited -- smart rotation of Orientation tag (where used --only-orientation) ++- smart rotation of Orientation tag (where used --only-orientation) Disk I/O @@ -46,6 +46,8 @@ q to write intellectual aggregation on clisp + to implement --no-mtime, and put it to the config +- avoid hard link making where in and out files on different partitions + File naming @@ -31,8 +31,8 @@ my $noRename; # no rename needed, default is to rename to the YYYYmmddHHMMSS.ex my $noRotation; # no rotation needed, default is to rotate my $orientTag = 0; # rotate by changing Orientation tag (no real rotation) my $quiet = 0; # suppressing messages -my $rotateAngle; # define the angle, to rotate on, 90 or 270 -my $rotateThumbnail; # define the angle, to rotate on, 90 or 270 +my $rotateAngle; # define the angle to rotate on 90, 180 or 270 +my $rotateThumbnail; # define the angle to rotate on 90, 180 or 270 my $verbose = 0; # verbosity of output my $workDir = '.'; # we'll work ONLY in current directory @@ -86,7 +86,7 @@ sub getOptions { my $getOptions = GetOptions ( "aggr!" => \$aggr, "aggr-delta=i" => \$aggrDelta, - "aggr-directory|aggr-dir=s" => \$aggrDir, + "aggr-directory=s" => \$aggrDir, "aggr-dumb!" => \$aggrDumb, "aggr-template=s" => \$aggrTemplate, "comment-file=s" => \$comfile, @@ -221,7 +221,8 @@ my @rotparms = ('' , '-transverse' , '-rotate 270'); # array of options to jpegtran to rotate the file -my %rotangles = ( '90' => '-rotate 90', +my %rotangles = ('90' => '-rotate 90', + '180' => '-rotate 180', '270' => '-rotate 270'); # array of options to rotate file "by hands" my @angles = ( '' @@ -281,7 +282,7 @@ dbgmsg (1, "main(): Counter size: $counterprefixsize (amount files in cache: ", @files = sort @filenames; dbgmsg (4, "main(): Pushed files(", scalar(@files), "):\n", join("\n", @files), "\n"); -our $anglesuffix; # the suffix to add to the end of the rotated files 90cw or 270cw +our $anglesuffix; # the suffix to add to the end of the rotated files 90cw, 180cw or 270cw my $orientation; # Orientation tag value procmsg ("RENAMING / ROTATING\n===================\n"); @@ -532,7 +533,7 @@ sub aggregateFile { # sub timeNow { my $date = localtime(); - my $timeNow = sprintf("%04d%02d%02d%02d%02d%02d", + my $timeNow = sprintf("%.4d%.2d%.2d%.2d%.2d%.2d", $$date[5] + 1900, $$date[4] + 1, $$date[3], $$date[2], $$date[1], $$date[0]); return $timeNow; @@ -731,8 +732,8 @@ Options: -e, --extension <EXTENSION> extension of files to be processed: JPG, jpg, JPEG e.t.c. --name-template <TPL> filename template (see manual for details) --no-rename no rename needed, default is to rename to the YYYYmmddHHMMSS.ext - -r, --rotate-angle <90|270> define the angle, to rotate file and the thumbnail on, 90 or 270 (it's for the files where no Orientation tag is present and set right way) - --rotate-thumb <90|270> rotate only thumbnail by 90 or 270 degree (it's for the files which were rotated, but thumbnail wasn't) + -r, --rotate-angle <ANGLE> define the angle to rotate file and the thumbnail on 90, 180 or 270 (it's for the files where no Orientation tag is present and set right way) + --rotate-thumb <ANGLE> rotate only thumbnail by 90, 180 or 270 degree (it's for the files which were rotated, but thumbnail wasn't) --only-orientation rotate by changing Orientation tag (no real rotation) --no-rotate no rotation needed, default is to rotate --mtime (*) to set file mtime according DateTimeOriginal tag value @@ -944,19 +945,25 @@ B<%y> last two digits of year (00..99) no rename needed, default is to rename to the YYYYmmddHHMMSS.ext -=item B<--rotate-angle> I<90> or I<270> +=item B<--rotate-angle> I<ANGLE> -define the angle, to rotate file and the thumbnail on, 90 or 270. It's for the +define the angle to rotate file and the thumbnail on 90, 180 or 270. It's for the files where no Orientation tag is set right way. -=item B<--rotate-thumb> I<90> or I<270> +=item B<--rotate-thumb> I<ANGLE> -rotate only thumbnail by 90 or 270 degree. It's for the files which were +rotate only thumbnail by 90, 180 or 270 degree. It's for the files which were rotated, but thumbnail wasn't. =item B<--only-orientation> -rotate by changing Orientation tag, no real rotation +rotate by changing Orientation tag, no real rotation will be made. The +sequence of values when rotating image from normal (0 degrees) by 90cw is: 0 +-> 90 -> 180 -> 270 -> 0. It means set Orientation tag to 90cw after first +usage of rotation by 90cw and so on. For 270cw rotation algorithm uses +reversed sequence. Rotation by 180cw triggers values in two pairs: 0 <-> 180 +and 90 <-> 270. This option can't be applied to mirror values of Orientation +tag. =item B<--no-rotate> |