shibukawa / imagesize_py

MIT License
222 stars 43 forks source link

Returns (-1,-1) instead of exception when used on something unsupported #30

Open TobiX opened 4 years ago

TobiX commented 4 years ago

When using imagesize.get() on anything which is not supported (text files, empty files, etc.), the method just returns (-1,-1). I would suggest raising a ValueError instead (as is already the case when trying a random XML file, since is is parsed as SVG).

On the other hand, that would be a behavior change, so maybe either document the current behavior or bump the major version if this change is implemented?