Hi all, with regard to the above question I am making use of the Python Image Library (PIL).
Check out this code:
from PIL import Image
try:
im=Image.open(filename)
# exec some code
except IOError:
# filename not an image file
I am already aware that this is more than enough for multiple file types but my question is that if I have file types such as PSD, SVG or even XCF then these are not being detected for some reason.
PSD files actually throw the OverflowError exception for this and all I want to know is if there is a way which involves me including these files as well?
All help appreciated, cheers!