s3: convert images to RGB prior to save as JPEG

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40464
This commit is contained in:
Daniel Grana 2008-12-02 18:10:24 +00:00
parent 977e13e3b9
commit f371c952dd
1 changed files with 3 additions and 0 deletions

View File

@ -131,6 +131,9 @@ class S3ImagesPipeline(BaseImagesPipeline):
self._s3_put_image(thumb, key, info)
def _s3_put_image(self, image, key, info):
if image.mode != 'RGB':
image = image.convert('RGB')
buf = StringIO()
try:
image.save(buf, 'JPEG')