Coverage for /usr/lib/python3/dist-packages/PIL/__init__.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-14 15:55 +0200

1"""Pillow (Fork of the Python Imaging Library) 

2 

3Pillow is the friendly PIL fork by Jeffrey A. Clark (Alex) and contributors. 

4 https://github.com/python-pillow/Pillow/ 

5 

6Pillow is forked from PIL 1.1.7. 

7 

8PIL is the Python Imaging Library by Fredrik Lundh and contributors. 

9Copyright (c) 1999 by Secret Labs AB. 

10 

11Use PIL.__version__ for this Pillow version. 

12 

13;-) 

14""" 

15from __future__ import annotations 

16 

17from . import _version 

18 

19# VERSION was removed in Pillow 6.0.0. 

20# PILLOW_VERSION was removed in Pillow 9.0.0. 

21# Use __version__ instead. 

22__version__ = _version.__version__ 

23del _version 

24 

25 

26_plugins = [ 

27 "BlpImagePlugin", 

28 "BmpImagePlugin", 

29 "BufrStubImagePlugin", 

30 "CurImagePlugin", 

31 "DcxImagePlugin", 

32 "DdsImagePlugin", 

33 "EpsImagePlugin", 

34 "FitsImagePlugin", 

35 "FliImagePlugin", 

36 "FpxImagePlugin", 

37 "FtexImagePlugin", 

38 "GbrImagePlugin", 

39 "GifImagePlugin", 

40 "GribStubImagePlugin", 

41 "Hdf5StubImagePlugin", 

42 "IcnsImagePlugin", 

43 "IcoImagePlugin", 

44 "ImImagePlugin", 

45 "ImtImagePlugin", 

46 "IptcImagePlugin", 

47 "JpegImagePlugin", 

48 "Jpeg2KImagePlugin", 

49 "McIdasImagePlugin", 

50 "MicImagePlugin", 

51 "MpegImagePlugin", 

52 "MpoImagePlugin", 

53 "MspImagePlugin", 

54 "PalmImagePlugin", 

55 "PcdImagePlugin", 

56 "PcxImagePlugin", 

57 "PdfImagePlugin", 

58 "PixarImagePlugin", 

59 "PngImagePlugin", 

60 "PpmImagePlugin", 

61 "PsdImagePlugin", 

62 "QoiImagePlugin", 

63 "SgiImagePlugin", 

64 "SpiderImagePlugin", 

65 "SunImagePlugin", 

66 "TgaImagePlugin", 

67 "TiffImagePlugin", 

68 "WebPImagePlugin", 

69 "WmfImagePlugin", 

70 "XbmImagePlugin", 

71 "XpmImagePlugin", 

72 "XVThumbImagePlugin", 

73] 

74 

75 

76class UnidentifiedImageError(OSError): 

77 """ 

78 Raised in :py:meth:`PIL.Image.open` if an image cannot be opened and identified. 

79 

80 If a PNG image raises this error, setting :data:`.ImageFile.LOAD_TRUNCATED_IMAGES` 

81 to true may allow the image to be opened after all. The setting will ignore missing 

82 data and checksum failures. 

83 """ 

84 

85 pass