A small script can fix it and create subdirectories with 1280x1024 and 800x600 scaled images. It also rotates original images lossless preserving original EXIF data - don't be afraid about the quality!
To use this, simply add packages: imagemagick, exiftran & perl bindings Image::Magick.
#!/usr/bin/perl -w
`exiftran -aip *.JPG`;
`exiftran -aip *.jpg`;
use strict;
use Image::Magick;
use Cwd;
my $currdir = ( getcwd =~ m{([^/]+)$} )[0];
my $webdir = $currdir . '_to1280';
my $web800 = $currdir . '_to800';
print "Creating dirs: $webdir, $web800\n";
mkdir $webdir;
mkdir $web800;
print $| = 1;
foreach my $filename (<*.jpg>, <*.JPG>) {
# read this
my $image = Image::Magick->new();
$image->read($filename);
# scale it
print "$filename ";
$image->Thumbnail(geometry => '1280x1024>');
$image->write($webdir . '/' . lc($filename));
$image->Thumbnail(geometry => '800x600>');
$image->write($web800 . '/' . lc($filename));
print ".\n";
}
3 comments:
Why did not to use RenRot?
http://freshmeat.net/projects/renrot
With windows you can use JPEG Lossless Rotator, http://www.annystudio.com/software/jpeglosslessrotator/
In batch mode just simply type in your photo directory:
jpegr.exe -auto .
to fix their rotation (however it is annoying to confirm the question - it is not a batch mode).
Still too much hassle instead of just one quick button (remember Amazon 1-click-to-buy feature)
I think you should make it case insensitive oon the input (why differentiate between jpg an JPG) and besides, the output files should be lower case only :)
Post a Comment