gfx.py: PNGs should be opened in binary mode

PNG files were opened as text files, thus the signature 0x0D 0x0A bytes were swallowed depending on OS.

Signed-off-by: Tauwasser <tauwasser@gmail.com>
This commit is contained in:
Tauwasser 2016-02-28 23:14:53 +01:00 committed by yenatch
parent 2ae1ae2f19
commit e46b63cca2

View File

@ -634,7 +634,7 @@ def png_to_2bpp(filein, **kwargs):
arguments.update(kwargs)
if type(filein) is str:
filein = open(filein)
filein = open(filein, 'rb')
assert type(filein) is file