mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 20:27:06 +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
37d61f1e9b
commit
0400b5f304
|
@ -347,6 +347,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")
|
||||
|
|
|
@ -293,3 +293,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")
|
||||
|
|
|
@ -177,3 +177,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")
|
||||
|
|
|
@ -155,4 +155,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"])
|
||||
|
|
|
@ -224,4 +224,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