Você está aqui: Python ::: Pillow Python Imaging Library ::: Image |
Como descobrir as propriedades e métodos do objeto Image da biblioteca Pillow usando a função dir() do PythonQuantidade de visualizações: 567 vezes |
Em algumas situações nós gostaríamos de saber as propriedades e funções do objeto Image da biblioteca Pillow do Python. Para isso nós só precisamos abrir uma janela interativa do Python e disparar a função dir(). Assim, abra uma nova janela de terminal, entre no modo interativo do Python e dispare os comandos a seguir: c:\estudos_python>python Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. Ao executar este código Python nós teremos o seguinte resultado: ['_Image__transformer', '_PngImageFile__fp', '_PngImageFile__frame', '_PngImageFile__prepare_idat', '__array_interface__', '__class__', '__copy__', '__delattr__', '__dict__', '__dir__', '__doc__', '__enter__', '__eq__', '__exit__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_close__fp', '_close_exclusive_fp_after_loading', '_copy', '_crop', '_dump', '_ensure_mutable', '_exclusive_fp', '_exif', '_expand', '_get_safe_box', '_getexif', '_min_frame', '_new', '_open', '_repr_png_', '_seek', '_seek_check', '_size', '_text', 'alpha_composite', 'category', 'close', 'convert', 'copy', 'crop', 'custom_mimetype', 'decoderconfig', 'decodermaxblock', 'default_image', 'draft', 'effect_spread', 'entropy', 'filename', 'filter', 'format', 'format_description', 'fp', 'frombytes', 'get_format_mimetype', 'getbands', 'getbbox', 'getchannel', 'getcolors', 'getdata', 'getexif', 'getextrema', 'getim', 'getpalette', 'getpixel', 'getprojection', 'height', 'histogram', 'im', 'info', 'is_animated', 'load', 'load_end', 'load_prepare', 'load_read', 'mode', 'n_frames', 'palette', 'paste', 'png', 'point', 'private_chunks', 'putalpha', 'putdata', 'putpalette', 'putpixel', 'pyaccess', 'quantize', 'readonly', 'reduce', 'remap_palette', 'resize', 'rotate', 'save', 'seek', 'show', 'size', 'split', 'tell', 'text', 'thumbnail', 'tile', 'tobitmap', 'tobytes', 'toqimage', 'toqpixmap', 'transform', 'transpose', 'verify', 'width'] |
![]() |
Desafios, Exercícios e Algoritmos Resolvidos de Python |
Veja mais Dicas e truques de Python |
Dicas e truques de outras linguagens |
E-Books em PDF |
||||
|
||||
|
||||
Linguagens Mais Populares |
||||
1º lugar: Java |