ds1054z icon indicating copy to clipboard operation
ds1054z copied to clipboard

can't save screen: PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x04031C58>

Open isarafx opened this issue 4 years ago • 1 comments

ภาพ whenever i try to save a screenshot it raise pillow unidentify io_byte(as show in the picture) I already try to reinstall pillow and set DISPLAY_DATA_BYTES to 1152000 but still didn't work

isarafx avatar Oct 28 '20 09:10 isarafx

The issue seems that in case of 800x480 scopes the PNG file is truncated even if you set DISPLAY_DATA_BYTES to 1152000 (= 800x480x3). Adding from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True after the block with from PIL import Image, ImageOps, ImageEnhance in cli.py seems to solve it as a workaround but the real issue is obviously somewhere else and needs to be fixed there.

B-G-T avatar Nov 01 '20 11:11 B-G-T