pirate486743186 2018-12-31 07:41:41 +01:00
parent 37d61f1e9b
commit 0400b5f304
5 changed files with 9 additions and 3 deletions

View File

@ -347,6 +347,6 @@ def _save(im, fp, filename):
Image.register_open(BmpImageFile.format, BmpImageFile, _accept) Image.register_open(BmpImageFile.format, BmpImageFile, _accept)
Image.register_save(BmpImageFile.format, _save) Image.register_save(BmpImageFile.format, _save)
Image.register_extension(BmpImageFile.format, ".bmp") Image.register_extensions(BmpImageFile.format, [".bmp", ".dib"])
Image.register_mime(BmpImageFile.format, "image/bmp") Image.register_mime(BmpImageFile.format, "image/bmp")

View File

@ -293,3 +293,5 @@ class IcoImageFile(ImageFile.ImageFile):
Image.register_open(IcoImageFile.format, IcoImageFile, _accept) Image.register_open(IcoImageFile.format, IcoImageFile, _accept)
Image.register_save(IcoImageFile.format, _save) Image.register_save(IcoImageFile.format, _save)
Image.register_extension(IcoImageFile.format, ".ico") Image.register_extension(IcoImageFile.format, ".ico")
Image.register_mime(IcoImageFile.format, "image/x-icon")

View File

@ -177,3 +177,5 @@ Image.register_open(PcxImageFile.format, PcxImageFile, _accept)
Image.register_save(PcxImageFile.format, _save) Image.register_save(PcxImageFile.format, _save)
Image.register_extension(PcxImageFile.format, ".pcx") Image.register_extension(PcxImageFile.format, ".pcx")
Image.register_mime(PcxImageFile.format, "image/x-pcx")

View File

@ -155,4 +155,4 @@ def _save(im, fp, filename):
Image.register_open(PpmImageFile.format, PpmImageFile, _accept) Image.register_open(PpmImageFile.format, PpmImageFile, _accept)
Image.register_save(PpmImageFile.format, _save) Image.register_save(PpmImageFile.format, _save)
Image.register_extensions(PpmImageFile.format, [".pbm", ".pgm", ".ppm"]) Image.register_extensions(PpmImageFile.format, [".pbm", ".pgm", ".ppm", ".pnm"])

View File

@ -224,4 +224,6 @@ def _save(im, fp, filename):
Image.register_open(TgaImageFile.format, TgaImageFile) Image.register_open(TgaImageFile.format, TgaImageFile)
Image.register_save(TgaImageFile.format, _save) Image.register_save(TgaImageFile.format, _save)
Image.register_extension(TgaImageFile.format, ".tga") Image.register_extensions(TgaImageFile.format, [".tga", ".icb", ".vda", ".vst"])
Image.register_mime(TgaImageFile.format, "image/x-tga")