Revision: 1752
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1752&view=rev
Author:   phantom_sf
Date:     2007-11-03 04:48:38 -0700 (Sat, 03 Nov 2007)

Log Message:
-----------
2007-11-03 P.G. Richardson <phantom_sf at users.sourceforge.net>

  * src/display_coverart.c
  
  Fixed bug in display coverart. Irregular sized album images were
  being scaled to the default sizes. 

Modified Paths:
--------------
    gtkpod/trunk/ChangeLog_detailed
    gtkpod/trunk/src/display_coverart.c

Modified: gtkpod/trunk/ChangeLog_detailed
===================================================================
--- gtkpod/trunk/ChangeLog_detailed     2007-11-01 22:26:07 UTC (rev 1751)
+++ gtkpod/trunk/ChangeLog_detailed     2007-11-03 11:48:38 UTC (rev 1752)
@@ -1,3 +1,10 @@
+2007-11-03 P.G. Richardson <phantom_sf at users.sourceforge.net>
+
+  * src/display_coverart.c
+  
+  Fixed bug in display coverart. Irregular sized album images were
+  being scaled to the default sizes. 
+  
 2007-11-01 P.G. Richardson <phantom_sf at users.sourceforge.net>
 
   * README

Modified: gtkpod/trunk/src/display_coverart.c
===================================================================
--- gtkpod/trunk/src/display_coverart.c 2007-11-01 22:26:07 UTC (rev 1751)
+++ gtkpod/trunk/src/display_coverart.c 2007-11-03 11:48:38 UTC (rev 1752)
@@ -612,28 +612,33 @@
          w = gdk_pixbuf_get_width (image);
          h = gdk_pixbuf_get_height (image);
          
-         if (default_size > 0 && (w > default_size || h > default_size))
+         if (default_size > 0)
                {
-                       /* need to scale the image back down to size */
-                       if (w == h)
-                       {
-                               w = default_size;
-                               h = default_size;
-                       }
-                       else if (h > w)
-                       {
-                               ratio = h / w;
-                               h = default_size;
-                               w = (gint) (default_size / ratio);
-                       }
-                       else
-                       {
-                               ratio = w / h;
-                               w = default_size;
-                               h = (gint) (default_size / ratio);
-                       }
-               
-                       pixbuf = gdk_pixbuf_scale_simple(image, w, h, 
GDK_INTERP_NEAREST);
+               if (w > default_size || h > default_size)
+               {
+                       /* need to scale the image back down to size */
+                       if (w == h)
+                       {
+                               w = default_size;
+                               h = default_size;
+                       }
+                       else if (h > w)
+                       {
+                               ratio = h / w;
+                               h = default_size;
+                               w = (gint) (default_size / ratio);
+                       }
+                       else
+                       {
+                               ratio = w / h;
+                               w = default_size;
+                               h = (gint) (default_size / ratio);
+                       }
+                       pixbuf = gdk_pixbuf_scale_simple(image, w, h, 
GDK_INTERP_NEAREST);
+               }
+               else
+                       pixbuf = gdk_pixbuf_copy (image);
+                       
                        gdk_pixbuf_unref (image);
                }
                else


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to