Hi everyone,
Ijust finished a script here at work and am setting up some error handling when I ran into a snag. Im trying to find out if there is an easy way to check that a list of files are valid images? Right now, if someone tries to import a text file the script stops working but no error is given.
Suggestions?
check for valid image types
Moderator: Paul Tuersley
- lloydalvarez
- Enhancement master
- Posts: 460
- Joined: June 17th, 2004, 9:27 am
- Location: New York City, NY
- Contact:
One way is to check the extension against an array of know image extensions. I would say that would take care of 99% of the cases. Otherwise on mac you could check the file type but I would proably just trust the extension.
-Lloyd
-Lloyd