From 9eeecef612256f1a2b8fc81c3098e78b4f475be2 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 4 Dec 2011 12:50:00 +0100 Subject: [PATCH] Fixed handling images that are rotated by 180 degrees in pic2mpg --- PLUGINS/src/pictures/HISTORY | 4 ++++ PLUGINS/src/pictures/pic2mpg | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PLUGINS/src/pictures/HISTORY b/PLUGINS/src/pictures/HISTORY index 7e82a3c7..d2d727fa 100644 --- a/PLUGINS/src/pictures/HISTORY +++ b/PLUGINS/src/pictures/HISTORY @@ -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. diff --git a/PLUGINS/src/pictures/pic2mpg b/PLUGINS/src/pictures/pic2mpg index 190ec260..c64cddf0 100755 --- a/PLUGINS/src/pictures/pic2mpg +++ b/PLUGINS/src/pictures/pic2mpg @@ -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);