Author: Brian May <bam@debian.org>
Description: add -trim argument to jpegtran
Bug-Debian: http://bugs.debian.org/284157

--- bins-1.1.29.orig/bins
+++ bins-1.1.29/bins
@@ -4894,7 +4894,7 @@
         if ($rotateJPEG eq "none") {
             beVerbose("\n  Looking for a JPEG rotation utility (jpegtran)... ", 3);
             if (commandAvailable("jpegtran")) {
-                $rotateJPEG = 'jpegtran -copy all -rotate %s -outfile "%s.tmp" "%s" && mv "%s.tmp" "%s"';
+                $rotateJPEG = 'jpegtran -trim -copy all -rotate %s -outfile "%s.tmp" "%s" && mv "%s.tmp" "%s"';
                 beVerboseN(" found jpegtran.", 3);
             } elsif (commandAvailable("jpegtran-mmx")) {
                 $rotateJPEG = 'jpegtran-mmx -copy all -rotate %s -outfile "%s.tmp" "%s" && mv "%s.tmp" "%s"';
@@ -5001,7 +5001,7 @@
         if ($progressifyJPEG eq "none") {
             beVerbose("\n  Looking for a progressive JPEG utility (jpegtran)... ", 3);
             if (commandAvailable("jpegtran")) {
-                $progressifyJPEG = 'jpegtran -copy all -progressive -outfile "%s" "%s"';
+                $progressifyJPEG = 'jpegtran -trim -copy all -progressive -outfile "%s" "%s"';
                 beVerboseN(" found jpegtran.", 3);
             } else {
                 $progressifyJPEG = "";
