mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +03:00
Replace lena.tif with hopper.tif (created with ImageMagick)
This commit is contained in:
parent
5f4c758b99
commit
eb458c7c8f
BIN
Tests/images/hopper.tif
Normal file
BIN
Tests/images/hopper.tif
Normal file
Binary file not shown.
|
@ -1,4 +1,4 @@
|
||||||
from helper import unittest, PillowTestCase, lena, py3
|
from helper import unittest, PillowTestCase, hopper, py3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ class TestFileLibTiff(LibTiffTestCase):
|
||||||
self.assert_image_equal(im, im2)
|
self.assert_image_equal(im, im2)
|
||||||
|
|
||||||
def test_compressions(self):
|
def test_compressions(self):
|
||||||
im = lena('RGB')
|
im = hopper('RGB')
|
||||||
out = self.tempfile('temp.tif')
|
out = self.tempfile('temp.tif')
|
||||||
|
|
||||||
for compression in ('packbits', 'tiff_lzw'):
|
for compression in ('packbits', 'tiff_lzw'):
|
||||||
|
@ -281,7 +281,7 @@ class TestFileLibTiff(LibTiffTestCase):
|
||||||
self.assert_image_similar(im, im2, 30)
|
self.assert_image_similar(im, im2, 30)
|
||||||
|
|
||||||
def test_cmyk_save(self):
|
def test_cmyk_save(self):
|
||||||
im = lena('CMYK')
|
im = hopper('CMYK')
|
||||||
out = self.tempfile('temp.tif')
|
out = self.tempfile('temp.tif')
|
||||||
|
|
||||||
im.save(out, compression='tiff_adobe_deflate')
|
im.save(out, compression='tiff_adobe_deflate')
|
||||||
|
@ -293,7 +293,7 @@ class TestFileLibTiff(LibTiffTestCase):
|
||||||
to output on stderr from the error thrown by libtiff. We need to
|
to output on stderr from the error thrown by libtiff. We need to
|
||||||
capture that but not now"""
|
capture that but not now"""
|
||||||
|
|
||||||
im = lena('RGB')
|
im = hopper('RGB')
|
||||||
out = self.tempfile('temp.tif')
|
out = self.tempfile('temp.tif')
|
||||||
|
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
|
@ -332,12 +332,12 @@ class TestFileLibTiff(LibTiffTestCase):
|
||||||
self.assertFalse(im.tag.next)
|
self.assertFalse(im.tag.next)
|
||||||
self.assertEqual(im.size, (20,20))
|
self.assertEqual(im.size, (20,20))
|
||||||
self.assertEqual(im.convert('RGB').getpixel((0,0)), (0,0,255))
|
self.assertEqual(im.convert('RGB').getpixel((0,0)), (0,0,255))
|
||||||
|
|
||||||
TiffImagePlugin.READ_LIBTIFF = False
|
TiffImagePlugin.READ_LIBTIFF = False
|
||||||
|
|
||||||
def test__next(self):
|
def test__next(self):
|
||||||
TiffImagePlugin.READ_LIBTIFF = True
|
TiffImagePlugin.READ_LIBTIFF = True
|
||||||
im = Image.open('Tests/images/lena.tif')
|
im = Image.open('Tests/images/hopper.tif')
|
||||||
self.assertFalse(im.tag.next)
|
self.assertFalse(im.tag.next)
|
||||||
im.load()
|
im.load()
|
||||||
self.assertFalse(im.tag.next)
|
self.assertFalse(im.tag.next)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from helper import unittest, PillowTestCase, lena
|
from helper import unittest, PillowTestCase, hopper
|
||||||
|
|
||||||
from PIL import Image, TiffImagePlugin, TiffTags
|
from PIL import Image, TiffImagePlugin, TiffTags
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class TestFileTiffMetadata(PillowTestCase):
|
||||||
data. https://github.com/python-pillow/Pillow/issues/291
|
data. https://github.com/python-pillow/Pillow/issues/291
|
||||||
"""
|
"""
|
||||||
|
|
||||||
img = lena()
|
img = hopper()
|
||||||
|
|
||||||
textdata = "This is some arbitrary metadata for a text field"
|
textdata = "This is some arbitrary metadata for a text field"
|
||||||
info = TiffImagePlugin.ImageFileDirectory()
|
info = TiffImagePlugin.ImageFileDirectory()
|
||||||
|
@ -63,7 +63,7 @@ class TestFileTiffMetadata(PillowTestCase):
|
||||||
|
|
||||||
def test_write_metadata(self):
|
def test_write_metadata(self):
|
||||||
""" Test metadata writing through the python code """
|
""" Test metadata writing through the python code """
|
||||||
img = Image.open('Tests/images/lena.tif')
|
img = Image.open('Tests/images/hopper.tif')
|
||||||
|
|
||||||
f = self.tempfile('temp.tiff')
|
f = self.tempfile('temp.tiff')
|
||||||
img.save(f, tiffinfo=img.tag)
|
img.save(f, tiffinfo=img.tag)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user