imghdr Questions

11

Solved

I am currently using PIL. from PIL import Image try: im = Image.open(filename) # do stuff except IOError: # filename not an image file However, while this sufficiently covers most cases, some ...
Adalai asked 20/5, 2009 at 17:55

3

I'm downloading a lot of images from imgur.com with a Python script and since I have all the links in the format http://imgur.com/{id} I have to force download them by replacing the original url wi...
Menendez asked 26/4, 2016 at 16:29

1

Solved

How to use StringIO with imghdr to determine if valid image I loaded a image into image_file = StringIO(open("test.gif",'rb').read()) imghdr.what(image_file.getvalue()) print imghdr.what(im...
Anubis asked 18/3, 2014 at 23:13
1

© 2022 - 2024 — McMap. All rights reserved.