Fixed handling images that are rotated by 180 degrees in pic2mpg

This commit is contained in:
Klaus Schmidinger 2011-12-04 12:50:00 +01:00
parent a49ce434f6
commit 9eeecef612
2 changed files with 6 additions and 2 deletions

View File

@ -55,3 +55,7 @@ VDR Plugin 'pictures' Revision History
- The pic2mpg script now generates HD images (thanks to Andre Weidemann for his
support in using convert/ffmpeg). The old SD version is still available as
pic2mpg-sd.
2011-11-02:
- Fixed handling images that are rotated by 180 degrees in pic2mpg.

View File

@ -7,7 +7,7 @@
#
# See the README file for copyright information and how to reach the author.
#
# $Id: pic2mpg 2.2 2011/08/14 13:34:15 kls Exp $
# $Id: pic2mpg 2.3 2011/12/04 12:50:00 kls Exp $
use File::Path;
use File::Spec;
@ -124,7 +124,7 @@ sub ConvertFile
return if (!defined $PICTYPES{$Type});
my $Exif = ImageInfo($Pict);
my $Orientation = $$Exif{"Orientation"};
my ($Degrees) = $Orientation =~ /Rotate ([0-9]+) /;
my ($Degrees) = $Orientation =~ /Rotate ([0-9]+)/;
my $Rotate = $Degrees ? "-rotate $Degrees" : "";
print "orientation = '$Orientation' -> rotation = $Rotate\n" if ($Detailed);
$Pict = EscapeMeta($Pict);