Open BMP with header size 108 bytes

PIL doest not support
http://msdn.microsoft.com/en-us/library/windows/desktop/dd183380%28v=vs.85%29.aspx

This header is very similar to this one
http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx

With given changes its possible to open and manipulate BMP file with
header size of 108 bytes.
This commit is contained in:
Piotrek Szymański 2013-12-05 13:48:27 +00:00
parent 404b245d89
commit 278441d1d7

View File

@ -82,7 +82,7 @@ class BmpImageFile(ImageFile.ImageFile):
colors = 0
direction = -1
elif len(s) in [40, 64]:
elif len(s) in [40, 64, 108]:
# WIN 3.1 or OS/2 2.0 INFO
bits = i16(s[14:])