[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnupod] Do not stretch artwork
From: |
H. Langos |
Subject: |
Re: [Bug-gnupod] Do not stretch artwork |
Date: |
Mon, 15 Jun 2009 16:45:14 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi Richard,
Nice patch. I was too lazy to do it myself but I appreciate that patch.
I'll commit it as soon as I can.
On Sun, Jun 14, 2009 at 11:06:02PM +0200, Richard van den Berg wrote:
> 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.
...
> - 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:-");
Are you sure that white is always the best way? I think the ipod touch
is generally black and thus back might be better there?
Anyway "white" is default: (from imagemagick.org)
> The color is specified using the format described under the -fill option.
> The default background color (if none is specified or found in the image)
> is white.
cheers
-henrik