From 5266a4506aabe9ccd796fc4b5b0c8d7726182a35 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 25 Dec 2015 14:15:01 +1100 Subject: [PATCH] Changed register calls to use format property --- PIL/FpxImagePlugin.py | 4 ++-- PIL/ImtImagePlugin.py | 2 +- PIL/McIdasImagePlugin.py | 2 +- PIL/PixarImagePlugin.py | 2 +- PIL/XVThumbImagePlugin.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PIL/FpxImagePlugin.py b/PIL/FpxImagePlugin.py index d369e05fa..aefc57420 100644 --- a/PIL/FpxImagePlugin.py +++ b/PIL/FpxImagePlugin.py @@ -221,6 +221,6 @@ class FpxImageFile(ImageFile.ImageFile): # # -------------------------------------------------------------------- -Image.register_open("FPX", FpxImageFile, _accept) +Image.register_open(FpxImageFile.format, FpxImageFile, _accept) -Image.register_extension("FPX", ".fpx") +Image.register_extension(FpxImageFile.format, ".fpx") diff --git a/PIL/ImtImagePlugin.py b/PIL/ImtImagePlugin.py index 1ca2c25b0..63e892483 100644 --- a/PIL/ImtImagePlugin.py +++ b/PIL/ImtImagePlugin.py @@ -89,7 +89,7 @@ class ImtImageFile(ImageFile.ImageFile): # # -------------------------------------------------------------------- -Image.register_open("IMT", ImtImageFile) +Image.register_open(ImtImageFile.format, ImtImageFile) # # no extension registered (".im" is simply too common) diff --git a/PIL/McIdasImagePlugin.py b/PIL/McIdasImagePlugin.py index 705fa574f..b75360353 100644 --- a/PIL/McIdasImagePlugin.py +++ b/PIL/McIdasImagePlugin.py @@ -69,6 +69,6 @@ class McIdasImageFile(ImageFile.ImageFile): # -------------------------------------------------------------------- # registry -Image.register_open("MCIDAS", McIdasImageFile, _accept) +Image.register_open(McIdasImageFile.format, McIdasImageFile, _accept) # no default extension diff --git a/PIL/PixarImagePlugin.py b/PIL/PixarImagePlugin.py index 7fef35408..db2ee55f8 100644 --- a/PIL/PixarImagePlugin.py +++ b/PIL/PixarImagePlugin.py @@ -62,7 +62,7 @@ class PixarImageFile(ImageFile.ImageFile): # # -------------------------------------------------------------------- -Image.register_open("PIXAR", PixarImageFile) +Image.register_open(PixarImageFile.format, PixarImageFile) # # FIXME: what's the standard extension? diff --git a/PIL/XVThumbImagePlugin.py b/PIL/XVThumbImagePlugin.py index 9d4b704f6..311e65dc0 100644 --- a/PIL/XVThumbImagePlugin.py +++ b/PIL/XVThumbImagePlugin.py @@ -72,4 +72,4 @@ class XVThumbImageFile(ImageFile.ImageFile): # -------------------------------------------------------------------- -Image.register_open("XVThumb", XVThumbImageFile) +Image.register_open(XVThumbImageFile.format, XVThumbImageFile)