diff options
Diffstat (limited to 'source/blender/datatoc/datatoc_icon.py')
-rwxr-xr-x | source/blender/datatoc/datatoc_icon.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/datatoc/datatoc_icon.py b/source/blender/datatoc/datatoc_icon.py index 6d8b24924f1..875e5359079 100755 --- a/source/blender/datatoc/datatoc_icon.py +++ b/source/blender/datatoc/datatoc_icon.py @@ -26,7 +26,10 @@ def write_png(buf, width, height): import struct # reverse the vertical line order and add null bytes at the start width_byte_4 = width * 4 - raw_data = b"".join(b'\x00' + buf[span:span + width_byte_4] for span in range((height - 1) * width * 4, -1, - width_byte_4)) + raw_data = b"".join( + b'\x00' + buf[span:span + width_byte_4] + for span in range((height - 1) * width * 4, -1, - width_byte_4) + ) def png_pack(png_tag, data): chunk_head = png_tag + data |