I might still convert the artwork generation to Image::Magick, but in the meantime here is a patch to not distort the artwork to a square. Instead the aspect is preserved, and white bands are added (left + right or top + bottom) when needed.

Cheers,

Richard
Index: src/ext/ArtworkDB.pm
===================================================================
RCS file: /sources/gnupod/gnupod/src/ext/ArtworkDB.pm,v
retrieving revision 1.22
diff -u -r1.22 ArtworkDB.pm
--- src/ext/ArtworkDB.pm        5 Jun 2009 12:55:56 -0000       1.22
+++ src/ext/ArtworkDB.pm        14 Jun 2009 21:02:16 -0000
@@ -174,7 +174,7 @@
                $self->{fbimg}->{source_size} = (-s $file) or return 0; # no 
thanks
                foreach my $mr (@$mode) {
                        my $buff = '';
-                       open(IM, "-|") || exec("convert", "-resize", 
"$mr->{height}x$mr->{width}!", "-depth", 8, $file, "RGB:-");
+                       open(IM, "-|") || exec("convert", "-resize", 
"$mr->{height}x$mr->{width}", 
"-background","white","-gravity","center","-extent","$mr->{height}x$mr->{width}",
 "-depth", "8", $file, "RGB:-");
                        binmode(IM);
                        while(<IM>) { $buff .= $_  }
                        close(IM);
_______________________________________________
Bug-gnupod mailing list
Bug-gnupod@nongnu.org
http://lists.nongnu.org/mailman/listinfo/bug-gnupod

Reply via email to