This commit is contained in:
hugovk 2014-07-16 14:26:30 +03:00
parent d04ffd2377
commit 43dab9113e

View File

@ -29,6 +29,7 @@ i32 = _binary.i32be
def _accept(prefix): def _accept(prefix):
return i32(prefix) == 0x59a66a95 return i32(prefix) == 0x59a66a95
## ##
# Image plugin for Sun raster files. # Image plugin for Sun raster files.
@ -70,9 +71,9 @@ class SunImageFile(ImageFile.ImageFile):
stride = (((self.size[0] * depth + 7) // 8) + 3) & (~3) stride = (((self.size[0] * depth + 7) // 8) + 3) & (~3)
if compression == 1: if compression == 1:
self.tile = [("raw", (0,0)+self.size, offset, (rawmode, stride))] self.tile = [("raw", (0, 0)+self.size, offset, (rawmode, stride))]
elif compression == 2: elif compression == 2:
self.tile = [("sun_rle", (0,0)+self.size, offset, rawmode)] self.tile = [("sun_rle", (0, 0)+self.size, offset, rawmode)]
# #
# registry # registry