Skip to content

Commit ff82e46

Browse files
author
BoboTiG
committed
Fix BoboTiG#7: libpng warning on linux (ignoring bad filter type)
1 parent a4d4050 commit ff82e46

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mss.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from __future__ import (unicode_literals, print_function)
1515

16-
__version__ = '1.0.0'
16+
__version__ = '1.0.1'
1717
__author__ = "Mickaël 'Tiger-222' Schoentgen"
1818
__copyright__ = '''
1919
Copyright (c) 2013-2015, Mickaël 'Tiger-222' Schoentgen
@@ -193,8 +193,9 @@ def save_img(self, data, width, height, output):
193193
zcrc32 = crc32
194194
zcompr = compress
195195
len_sl = width * 3
196+
png_filter = b(b'>B', 0)
196197
scanlines = b''.join(
197-
[b'0' + data[y * len_sl:y * len_sl + len_sl]
198+
[png_filter + data[y * len_sl:y * len_sl + len_sl]
198199
for y in range(height)])
199200

200201
magic = pack(b'>8B', 137, 80, 78, 71, 13, 10, 26, 10)

0 commit comments

Comments
 (0)