Update of /cvsroot/freevo/freevo/skins/dischi1 In directory sc8-pr-cvs1:/tmp/cvs-serv23824
Modified Files: skin_utils.py Log Message: some improvements for image loading Index: skin_utils.py =================================================================== RCS file: /cvsroot/freevo/freevo/skins/dischi1/skin_utils.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** skin_utils.py 7 Mar 2003 22:54:12 -0000 1.3 --- skin_utils.py 14 Mar 2003 19:36:57 -0000 1.4 *************** *** 10,13 **** --- 10,16 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.4 2003/03/14 19:36:57 dischi + # some improvements for image loading + # # Revision 1.3 2003/03/07 22:54:12 dischi # First version of the extended menu with image support. Try the music menu *************** *** 82,87 **** image = osd.loadbitmap('thumb://%s' % image) - if type == 'audio': m = min(height, width) --- 85,94 ---- image = osd.loadbitmap('thumb://%s' % image) + if not image: + return + + else: + force = 0 if type == 'audio': m = min(height, width) *************** *** 89,99 **** width = m ! else: ! if type == 'video': # aspect 7:5 i_w = 5 i_h = 7 - else: - i_w, i_h = image.get_size() if int(float(width * i_h) / i_w) > height: --- 96,105 ---- width = m ! elif image: ! i_w, i_h = image.get_size() ! if type == 'video' and not force and i_w < i_h: # aspect 7:5 i_w = 5 i_h = 7 if int(float(width * i_h) / i_w) > height: *************** *** 101,105 **** else: height = int(float(width * i_h) / i_w) ! return pygame.transform.scale(image, (width, height)) --- 107,111 ---- else: height = int(float(width * i_h) / i_w) ! return pygame.transform.scale(image, (width, height)) ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog