mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 09:56:17 +03:00
commit
c1a8f29944
|
@ -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)
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
from __future__ import print_function
|
||||
|
||||
import site
|
||||
import getopt, string, sys
|
||||
|
||||
from PIL import Image
|
||||
|
|
|
@ -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...")
|
||||
|
|
|
@ -165,7 +165,6 @@ class PillowTestCase(unittest.TestCase):
|
|||
|
||||
# helpers
|
||||
|
||||
import sys
|
||||
py3 = (sys.version_info >= (3, 0))
|
||||
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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"]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user