mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 01:04:29 +03:00
adding some missing mime types and extensions
for reference https://en.wikipedia.org/wiki/BMP_file_format https://en.wikipedia.org/wiki/ICO_(file_format) https://en.wikipedia.org/wiki/Pcx https://en.wikipedia.org/wiki/Netpbm_format https://en.wikipedia.org/wiki/.tga
This commit is contained in:
parent
0e9e3dd304
commit
a62c825922
|
@ -349,6 +349,6 @@ def _save(im, fp, filename):
|
|||
Image.register_open(BmpImageFile.format, BmpImageFile, _accept)
|
||||
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")
|
||||
|
|
|
@ -295,3 +295,5 @@ class IcoImageFile(ImageFile.ImageFile):
|
|||
Image.register_open(IcoImageFile.format, IcoImageFile, _accept)
|
||||
Image.register_save(IcoImageFile.format, _save)
|
||||
Image.register_extension(IcoImageFile.format, ".ico")
|
||||
|
||||
Image.register_mime(IcoImageFile.format, "image/x-icon")
|
||||
|
|
|
@ -180,3 +180,5 @@ Image.register_open(PcxImageFile.format, PcxImageFile, _accept)
|
|||
Image.register_save(PcxImageFile.format, _save)
|
||||
|
||||
Image.register_extension(PcxImageFile.format, ".pcx")
|
||||
|
||||
Image.register_mime(PcxImageFile.format, "image/x-pcx")
|
||||
|
|
|
@ -157,4 +157,4 @@ def _save(im, fp, filename):
|
|||
Image.register_open(PpmImageFile.format, PpmImageFile, _accept)
|
||||
Image.register_save(PpmImageFile.format, _save)
|
||||
|
||||
Image.register_extensions(PpmImageFile.format, [".pbm", ".pgm", ".ppm"])
|
||||
Image.register_extensions(PpmImageFile.format, [".pbm", ".pgm", ".ppm", ".pnm"])
|
||||
|
|
|
@ -226,4 +226,6 @@ def _save(im, fp, filename):
|
|||
Image.register_open(TgaImageFile.format, TgaImageFile)
|
||||
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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user