Merge pull request #1158 from radarhere/health

Health fixes
This commit is contained in:
Alex Clark 2015-03-31 19:57:02 -04:00
commit c1a8f29944
7 changed files with 8 additions and 13 deletions

View File

@ -20,7 +20,7 @@ __version__ = "0.1"
from PIL import Image, ImageFile
from PIL.OleFileIO import *
from PIL.OleFileIO import i8, i32, MAGIC
# we map from colour field tuples to (mode, rawmode) descriptors
@ -130,15 +130,15 @@ class FpxImageFile(ImageFile.ImageFile):
fp = self.ole.openstream(stream)
# skip prefix
p = fp.read(28)
fp.read(28)
# header stream
s = fp.read(36)
size = i32(s, 4), i32(s, 8)
tilecount = i32(s, 12)
#tilecount = i32(s, 12)
tilesize = i32(s, 16), i32(s, 20)
channels = i32(s, 24)
#channels = i32(s, 24)
offset = i32(s, 28)
length = i32(s, 32)

View File

@ -54,7 +54,7 @@ class PyAccess(object):
print (vals)
self._post_init()
def _post_init():
def _post_init(self):
pass
def __setitem__(self, xy, color):

View File

@ -15,7 +15,6 @@
from __future__ import print_function
import site
import getopt, string, sys
from PIL import Image

View File

@ -11,6 +11,7 @@
# 0.3 2003-05-06 fl Fixed a typo or two.
#
import getopt, os, sys
from __future__ import print_function
VERSION = "pilprint 0.3/2003-05-05"
@ -21,15 +22,12 @@ from PIL import PSDraw
letter = ( 1.0*72, 1.0*72, 7.5*72, 10.0*72 )
def description(file, image):
import os
title = os.path.splitext(os.path.split(file)[1])[0]
format = " (%dx%d "
if image.format:
format = " (" + image.format + " %dx%d "
return title + format % image.size + image.mode + ")"
import getopt, os, sys
if len(sys.argv) == 1:
print("PIL Print 0.2a1/96-10-04 -- print image files")
print("Usage: pilprint files...")

View File

@ -165,7 +165,6 @@ class PillowTestCase(unittest.TestCase):
# helpers
import sys
py3 = (sys.version_info >= (3, 0))

View File

@ -128,13 +128,13 @@ class TestImageTransform(PillowTestCase):
# Running by default, but I'd totally understand not doing it in
# the future
foo = [
pattern = [
Image.new('RGBA', (1024, 1024), (a, a, a, a))
for a in range(1, 65)
]
# Yeah. Watch some JIT optimize this out.
foo = None
pattern = None
self.test_mesh()

View File

@ -240,7 +240,6 @@ class TestImageCms(PillowTestCase):
self.assert_image_similar(hopper(), out, 2)
def test_profile_tobytes(self):
from io import BytesIO
i = Image.open("Tests/images/rgb.jpg")
p = ImageCms.getOpenProfile(BytesIO(i.info["icc_profile"]))