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)