hi,
ich hab eine kleines script geschrieben das n photos basierend auf der exifinformation dreht.
und dann die exif information updated.
für linux.
sicherlich gibts sowas in form eines GUIs aber mir ist die shell schon immer lieber gewesen.
funktionieren tut es so:
./rotatepic.pl <dateiliste>
beispiel:
cd /home/tom/meinebilder/
/bin/rotatepic.pl *.jpg
dachte mir ich post das hier.......vielleicht kann es irgendjemand brauchen. ansonsten einfach ingorieren
Alles anzeigen
lg
thomas
BTW: für anregungen, fragen und kritik bin ich immer offen.
ich hab eine kleines script geschrieben das n photos basierend auf der exifinformation dreht.
und dann die exif information updated.
für linux.
sicherlich gibts sowas in form eines GUIs aber mir ist die shell schon immer lieber gewesen.
funktionieren tut es so:
./rotatepic.pl <dateiliste>
beispiel:
cd /home/tom/meinebilder/
/bin/rotatepic.pl *.jpg
dachte mir ich post das hier.......vielleicht kann es irgendjemand brauchen. ansonsten einfach ingorieren

Perl-Quellcode
- #!/usr/bin/perl
- #Thomas Anglmaier 2007
- #rotatepic.pl v0.2
- #quick and dirty - no warranty - use on your own risk!
- #automatic rotate script for Nikons D70(s) camera
- #(probably also working with other makes)
- #this script needs exiftool and imagemagick installed
- #tested on debian lenny/sid
- #Under the terms of GPLv2.
- $cw = "90";
- $ccw = "-90";
- @files = @ARGV;
- foreach (@files) {
- $orientation = `exiftool $_ | grep Orientation`;
- next if $orientation =~ /Horizontal \(normal\)/;
- system("convert -rotate $ccw $_ $_") if $orientation =~ /Rotate 270 CW/ && print "$_ rotated 90° CCW | ";
- system("convert -rotate $cw $_ $_") if $orientation =~ /Rotate 90 CW/ && print "$_ rotated 90° CW | ";
- system("exiftool -overwrite_original -Orientation=\"Horizontal (normal)\" $_ > /dev/null");
- print "EXIF Information updated\n" if $? == 0;
lg
thomas
BTW: für anregungen, fragen und kritik bin ich immer offen.
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von tamash ()