mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
Updated ICNS documentation [ci skip]
This commit is contained in:
parent
8c739a0796
commit
e6541cb3d6
|
@ -120,6 +120,25 @@ attributes before loading the file::
|
|||
im.size = (x1 - x0, y1 - y0)
|
||||
im.tile = [(tag, (0, 0) + im.size, offset, extra)]
|
||||
|
||||
ICNS
|
||||
^^^^
|
||||
|
||||
PIL reads and (OS X only) writes Mac OS X ``.icns`` files. By default, the
|
||||
largest available icon is read, though you can override this by setting the
|
||||
:py:attr:`~PIL.Image.Image.size` property before calling
|
||||
:py:meth:`~PIL.Image.Image.load`. The :py:meth:`~PIL.Image.Image.open` method
|
||||
sets the following :py:attr:`~PIL.Image.Image.info` property:
|
||||
|
||||
**sizes**
|
||||
A list of supported sizes found in this icon file; these are a
|
||||
3-tuple, ``(width, height, scale)``, where ``scale`` is 2 for a retina
|
||||
icon and 1 for a standard icon. You *are* permitted to use this 3-tuple
|
||||
format for the :py:attr:`~PIL.Image.Image.size` property if you set it
|
||||
before calling :py:meth:`~PIL.Image.Image.load`; after loading, the size
|
||||
will be reset to a 2-tuple containing pixel dimensions (so, e.g. if you
|
||||
ask for ``(512, 512, 2)``, the final value of
|
||||
:py:attr:`~PIL.Image.Image.size` will be ``(1024, 1024)``).
|
||||
|
||||
IM
|
||||
^^
|
||||
|
||||
|
@ -665,25 +684,6 @@ The :py:meth:`~PIL.Image.Image.save` method supports the following options:
|
|||
(64, 64), (128, 128), (255, 255)]``. Any size is bigger then the original
|
||||
size or 255 will be ignored.
|
||||
|
||||
ICNS
|
||||
^^^^
|
||||
|
||||
PIL reads Mac OS X ``.icns`` files. By default, the largest available icon is
|
||||
read, though you can override this by setting the :py:attr:`~PIL.Image.Image.size`
|
||||
property before calling :py:meth:`~PIL.Image.Image.load`. The
|
||||
:py:meth:`~PIL.Image.Image.open` method sets the following
|
||||
:py:attr:`~PIL.Image.Image.info` property:
|
||||
|
||||
**sizes**
|
||||
A list of supported sizes found in this icon file; these are a
|
||||
3-tuple, ``(width, height, scale)``, where ``scale`` is 2 for a retina
|
||||
icon and 1 for a standard icon. You *are* permitted to use this 3-tuple
|
||||
format for the :py:attr:`~PIL.Image.Image.size` property if you set it
|
||||
before calling :py:meth:`~PIL.Image.Image.load`; after loading, the size
|
||||
will be reset to a 2-tuple containing pixel dimensions (so, e.g. if you
|
||||
ask for ``(512, 512, 2)``, the final value of
|
||||
:py:attr:`~PIL.Image.Image.size` will be ``(1024, 1024)``).
|
||||
|
||||
IMT
|
||||
^^^
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user