Author: duncan
Date: Sun Jan 13 07:15:48 2008
New Revision: 10284

Log:
imlib2 doesn't like gif files
This is a fix when imlib2 raises an IOError on these images


Modified:
   branches/rel-1-7/freevo/src/osd.py
   branches/rel-1/freevo/src/osd.py

Modified: branches/rel-1-7/freevo/src/osd.py
==============================================================================
--- branches/rel-1-7/freevo/src/osd.py  (original)
+++ branches/rel-1-7/freevo/src/osd.py  Sun Jan 13 07:15:48 2008
@@ -669,9 +669,12 @@
                     try:
                         image = pygame.image.load(filename)
                     except pygame.error, e:
-                        _debug_('SDL image load problem: %s - trying Imaging' 
% e, DINFO)
-                        i = Image.open(filename)
-                        image = pygame.image.fromstring(i.tostring(), i.size, 
i.mode)
+                        _debug_('SDL image load problem: %s - trying imlib2' % 
e, DINFO)
+                        try:
+                            i = Image.open(filename)
+                            image = pygame.image.fromstring(i.tostring(), 
i.size, i.mode)
+                        except IOError, why:
+                            _debug_('imlib2 image load problem: %s' % (why), 
DERROR)
 
             except:
                 _debug_('Problem while loading image "%s"' % String(url), 
DWARNING)

Modified: branches/rel-1/freevo/src/osd.py
==============================================================================
--- branches/rel-1/freevo/src/osd.py    (original)
+++ branches/rel-1/freevo/src/osd.py    Sun Jan 13 07:15:48 2008
@@ -669,9 +669,12 @@
                     try:
                         image = pygame.image.load(filename)
                     except pygame.error, e:
-                        _debug_('SDL image load problem: %s - trying Imaging' 
% e, DINFO)
-                        i = Image.open(filename)
-                        image = pygame.image.fromstring(i.tostring(), i.size, 
i.mode)
+                        _debug_('SDL image load problem: %s - trying imlib2' % 
e, DINFO)
+                        try:
+                            i = Image.open(filename)
+                            image = pygame.image.fromstring(i.tostring(), 
i.size, i.mode)
+                        except IOError, why:
+                            _debug_('imlib2 image load problem: %s' % (why), 
DERROR)
 
             except:
                 _debug_('Problem while loading image "%s"' % String(url), 
DWARNING)

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to