Replace lena.tif with hopper.tif (created with ImageMagick)

This commit is contained in:
hugovk 2014-09-05 12:14:45 +03:00
parent 5f4c758b99
commit eb458c7c8f
3 changed files with 9 additions and 9 deletions

BIN
Tests/images/hopper.tif Normal file

Binary file not shown.

View File

@ -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(
@ -337,7 +337,7 @@ class TestFileLibTiff(LibTiffTestCase):
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)

View File

@ -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)