mirror of https://github.com/scrapy/scrapy.git
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:
parent
977e13e3b9
commit
f371c952dd
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in New Issue