Re: [Bug-gnupod] Do not stretch artwork
On Wed, Jun 17, 2009 at 10:58:42AM +0200, Christophe Fergeau wrote: > 2009/6/17 H. Langos : > > > I think SysInfoExtended is written by gtkpod. I think it was ment as a > > more readable version of apple's SysInfo file. But newer iPods don't have > > that SysInfo file anymore. My 3g nano (late 2007) doesn't. > > SysInfoExtended is written by libgpod hal callout (if installed). It's > just a dump of the information you can get using > http://www.ipodlinux.org/wiki/Device_Information Thank you for that link. That looks interesting. Stuff like: RAM 32 Could be valuable information.. but only as a option. gnupod tries to be portable so we can't rely too much on linux features like hal. cheers -henrik ___ Bug-gnupod mailing list Bug-gnupod@nongnu.org http://lists.nongnu.org/mailman/listinfo/bug-gnupod
Re: [Bug-gnupod] Do not stretch artwork
2009/6/17 H. Langos : > I think SysInfoExtended is written by gtkpod. I think it was ment as a > more readable version of apple's SysInfo file. But newer iPods don't have > that SysInfo file anymore. My 3g nano (late 2007) doesn't. SysInfoExtended is written by libgpod hal callout (if installed). It's just a dump of the information you can get using http://www.ipodlinux.org/wiki/Device_Information Christophe ___ Bug-gnupod mailing list Bug-gnupod@nongnu.org http://lists.nongnu.org/mailman/listinfo/bug-gnupod
Re: [Bug-gnupod] Do not stretch artwork
On Tue, Jun 16, 2009 at 10:08:00PM +0200, Richard van den Berg wrote: > On 6/15/09 6:01 PM, Christophe Fergeau wrote: >> The background color is specified in the SysInfoExtended file if you >> are using/parsing it. >> > > Thanks for the suggestion, but gnupod currently doen't parse this file. > I think the best thing to do is have an option to select the background > color. I think SysInfoExtended is written by gtkpod. I think it was ment as a more readable version of apple's SysInfo file. But newer iPods don't have that SysInfo file anymore. My 3g nano (late 2007) doesn't. See http://www.thismuchiknow.co.uk/?p=15 > However, SysInfo is now obsoleted by iTunes 7 / latest firmware update (no > device information is actually stored on the mass storage partition > anymore). We might add support for it, but currently gnupod is configured via ~/.gnupodrc cheers -henrik ___ Bug-gnupod mailing list Bug-gnupod@nongnu.org http://lists.nongnu.org/mailman/listinfo/bug-gnupod
Re: [Bug-gnupod] Do not stretch artwork
On 6/15/09 6:01 PM, Christophe Fergeau wrote: The background color is specified in the SysInfoExtended file if you are using/parsing it. Thanks for the suggestion, but gnupod currently doen't parse this file. I think the best thing to do is have an option to select the background color. Cheers, Richard ___ Bug-gnupod mailing list Bug-gnupod@nongnu.org http://lists.nongnu.org/mailman/listinfo/bug-gnupod
Re: [Bug-gnupod] Do not stretch artwork
2009/6/15 Richard van den Berg : >>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? > > Do you want to use the color of the iPod housing? I was going for the > background of the iPod UI. On my iPod Video the artwork is never displayed > full screen. There is always a white border. I guess e can should make it > configurable in the gnupodrc. The background color is specified in the SysInfoExtended file if you are using/parsing it. Christophe ___ Bug-gnupod mailing list Bug-gnupod@nongnu.org http://lists.nongnu.org/mailman/listinfo/bug-gnupod
Re: [Bug-gnupod] Do not stretch artwork
On Mon, Jun 15, 2009 at 05:12:00PM +0200, Richard van den Berg wrote: > >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? > > Do you want to use the color of the iPod housing? > I was going for the background of the iPod UI. Me too. I was under the impression that the UI background on an ipod touch was black. At least thats what i "seem" to remember from comercials .. but I may be completely off there. Anybody with an ipod touch out there? cheers -henrik ___ Bug-gnupod mailing list Bug-gnupod@nongnu.org http://lists.nongnu.org/mailman/listinfo/bug-gnupod
Re: [Bug-gnupod] Do not stretch artwork
>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? Do you want to use the color of the iPod housing? I was going for the background of the iPod UI. On my iPod Video the artwork is never displayed full screen. There is always a white border. I guess e can should make it configurable in the gnupodrc. Cheers, Richard ___ Bug-gnupod mailing list Bug-gnupod@nongnu.org http://lists.nongnu.org/mailman/listinfo/bug-gnupod
Re: [Bug-gnupod] Do not stretch artwork
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 ___ Bug-gnupod mailing list Bug-gnupod@nongnu.org http://lists.nongnu.org/mailman/listinfo/bug-gnupod
[Bug-gnupod] Do not stretch artwork
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.pm5 Jun 2009 12:55:56 - 1.22 +++ src/ext/ArtworkDB.pm14 Jun 2009 21:02:16 - @@ -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() { $buff .= $_ } close(IM); ___ Bug-gnupod mailing list Bug-gnupod@nongnu.org http://lists.nongnu.org/mailman/listinfo/bug-gnupod