Car insurance

Arquivo

Arquivo de Maio, 2009

Python: Detectar o formato de uma imagem

22, Maio, 2009 Nenhum comentário

Como detectar o formato ou tipo  de uma imagem em python?

Numa breve pesquisa no Google encontrei a biblioteca imghdr

"imghdr — Determine the type of an image"

Ou seja, por exemplo:

>>> import imghdr
>>> imghdr.what('minha_imagem.gif')

RESULTADO:
'gif'

fonte: http://docs.python.org/library/imghdr.html

Google Search Options

13, Maio, 2009 Nenhum comentário

Ajudas e filtros na pesquisa do Google:

Para já ainda só disponível no http://www.google.com (e não no http://www.google.pt)

Categories: Internet Tags: , ,