I'm using python-3.5.1 and I get this error when trying to use your module.
Traceback (most recent call last):
File "C:\Users\Keith\Desktop\generate content\generate content.py", line 4, in <module>
width, height = get_image_size.get_image_size('x.jpg')
File "C:\Users\Keith\Desktop\generate content\get_image_size.py", line 71, in get_image_size
img = get_image_metadata(file_path)
File "C:\Users\Keith\Desktop\generate content\get_image_size.py", line 101, in get_image_metadata
elif ((size >= 24) and data.startswith('\211PNG\r\n\032\n')
TypeError: startswith first arg must be bytes or a tuple of bytes, not str`
I was able to resolve the issue by inserting a 'b' before the string in all of the 'startswith' calls.
I'm using python-3.5.1 and I get this error when trying to use your module.
I was able to resolve the issue by inserting a 'b' before the string in all of the 'startswith' calls.
e.g. data.startswith(b'\211PNG\r\n\032\n')