projects
/
joel
/
kofoto.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6dd321
)
In Shelf.createImage, refuse to recognize images we can't convert to
author
Joel Rosdahl
<joel@rosdahl.net>
Fri, 3 Sep 2004 22:15:57 +0000
(22:15 +0000)
committer
Joel Rosdahl
<joel@rosdahl.net>
Fri, 3 Sep 2004 22:15:57 +0000
(22:15 +0000)
RGB mode later.
src/lib/kofoto/shelf.py
patch
|
blob
|
history
diff --git
a/src/lib/kofoto/shelf.py
b/src/lib/kofoto/shelf.py
index
62c12b0
..
f20e89b
100644
(file)
--- a/
src/lib/kofoto/shelf.py
+++ b/
src/lib/kofoto/shelf.py
@@
-747,11
+747,11
@@
class Shelf:
import Image as PILImage
try:
pilimg = PILImage.open(path)
+ if not pilimg.mode in ("L", "RGB", "CMYK"):
+ pilimg = pilimg.convert("RGB")
# except IOError:
except: # Work-around for buggy PIL.
raise NotAnImageError, path
- if pilimg.format == "MPEG":
- raise NotAnImageError, path
width, height = pilimg.size
location = unicode(os.path.realpath(path.encode(self.codeset)),
self.codeset)