From 8035b1a76a3947fd84572fb1d0f12ba5991f3d97 Mon Sep 17 00:00:00 2001 From: Brian Crowell Date: Tue, 23 Oct 2012 21:58:15 -0500 Subject: [PATCH] py3k: FIX: TGA missing o8 declaration Plus, TGA was eligible for a round-trip test in test_imagefile. It has one now. --- PIL/TgaImagePlugin.py | 1 + Tests/test_imagefile.py | 1 + 2 files changed, 2 insertions(+) diff --git a/PIL/TgaImagePlugin.py b/PIL/TgaImagePlugin.py index 82d469db3..b30d8dcb0 100644 --- a/PIL/TgaImagePlugin.py +++ b/PIL/TgaImagePlugin.py @@ -133,6 +133,7 @@ class TgaImageFile(ImageFile.ImageFile): # -------------------------------------------------------------------- # Write TGA file +o8 = _binary.o8 o16 = _binary.o16le o32 = _binary.o32le diff --git a/Tests/test_imagefile.py b/Tests/test_imagefile.py index e260a24dd..4b8c84299 100644 --- a/Tests/test_imagefile.py +++ b/Tests/test_imagefile.py @@ -40,6 +40,7 @@ def test_parser(): assert_image_equal(*roundtrip("PPM")) assert_image_equal(*roundtrip("TIFF")) assert_image_equal(*roundtrip("XBM")) + assert_image_equal(*roundtrip("TGA")) im1, im2 = roundtrip("JPEG") # lossy compression assert_image(im1, im2.mode, im2.size)