mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
d6a0dec15b
Not too convinced of the size fix. While it works against my file, I'm not sure someone would have accidentally been an index off and not noticed.
23 lines
499 B
Python
23 lines
499 B
Python
from tester import *
|
|
|
|
from PIL import Image, TarIO
|
|
|
|
# sample ppm stream
|
|
tarfile = "Images/lena.tar"
|
|
|
|
def test_sanity():
|
|
tar = TarIO.TarIO(tarfile, 'lena.png')
|
|
im = Image.open(tar)
|
|
im.load()
|
|
assert_equal(im.mode, "RGB")
|
|
assert_equal(im.size, (128, 128))
|
|
assert_equal(im.format, "PNG")
|
|
|
|
tar = TarIO.TarIO(tarfile, 'lena.jpg')
|
|
im = Image.open(tar)
|
|
im.load()
|
|
assert_equal(im.mode, "RGB")
|
|
assert_equal(im.size, (128, 128))
|
|
assert_equal(im.format, "JPEG")
|
|
|