leginon-org / leginon

Apache License 2.0
3 stars 1 forks source link

redux did not process RGB jpeg imagge to PNG format successfully #13

Closed anchi2c closed 1 month ago

anchi2c commented 1 month ago

Example redux request:

pipeline=standard&filename=/Users/anchi.cheng/testdata/appion/24may30a/extract/dogrun2/jpgs/24may30a_d_00004gr_00001sq_v01_00002hl_00004en.prtl.jpg&cache=0&rgb=1&shape=958x926&scaletype=stdev&scalemin=-3&scalemax=3&oformat=PNG&overlaycolor=0.35

This is from a myamiweb request that shows particle picks in an acquired image.

example file attached 24may30a_d_00004gr_00001sq_v01_00002hl_00004en prtl

Error traceback: Traceback (most recent call last): File "/Users/anchi.cheng/myami/redux/server.py", line 38, in run_process result = pipeline.process(**kwargs) File "/Users/anchi.cheng/myami/redux/pipeline.py", line 144, in process result = pipe(result) File "/Users/anchi.cheng/myami/redux/pipe.py", line 163, in __call__ return self.run(input, **self.kwargs) File "/Users/anchi.cheng/myami/redux/pipes/format.py", line 36, in run s = self.run_pil(input, oformat, rgb, overlay, overlaycolor) File "/Users/anchi.cheng/myami/redux/pipes/format.py", line 66, in run_pil pil_image = Image.fromarray(input) File "/Users/anchi.cheng/miniconda3/envs/myami-py3/lib/python3.9/site-packages/PIL/Image.py", line 3092, in fromarray raise TypeError(msg) from e TypeError: Cannot handle this data type: (1, 1, 3), <f8