Smart crop not working on V3
See original GitHub issueAfter updated to V3 I noticed that the smart crop is not working anymore. Using the same image on V2 it works fine.
This is the error message I get from cloudwatch:
[ERROR] 2018-10-03T15:36:21.533Z 14155d40-c722-11e8-8e9c-0989d2d55e75 Future exception was never retrieved: Traceback (most recent call last): File "/var/task/tornado/gen.py", line 1107, in run yielded = self.gen.throw(*exc_info) File "/var/task/thumbor/transformer.py", line 152, in smart_detect yield self.do_smart_detection() File "/var/task/tornado/gen.py", line 1099, in run value = future.result() File "/var/task/tornado/concurrent.py", line 260, in result raise_exc_info(self._exc_info) File "/var/task/tornado/gen.py", line 1113, in run yielded = self.gen.send(value) File "/var/task/thumbor/transformer.py", line 180, in do_smart_detection detectors[0](self.context, index=0, detectors=detectors).detect(self.after_smart_detect) File "/var/task/thumbor_rekognition/__init__.py", line 25, in detect raw_bytes = self.read_jpeg_bytes() File "/var/task/thumbor_rekognition/__init__.py", line 45, in read_jpeg_bytes self.context.modules.engine.image.save(bio, 'JPEG') File "/var/task/PIL/Image.py", line 1935, in save save_handler(self, fp, filename) File "/var/task/PIL/JpegImagePlugin.py", line 622, in _save raise IOError("cannot write mode %s as JPEG" % im.mode) IOError: cannot write mode RGBA as JPEG
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (3 by maintainers)
Top GitHub Comments
Hi @gustavoserafim. Thanks for bringing this issue to our attention. We’re currently updating the solution to v.4 and have added this issue to our backlog. Stay tuned!
@hayesry I have submitted a pull request to https://github.com/yu-liang-kono/thumbor_rekognition/pull/3 that will fix this issue.