in reply to How do I find the type of an image?
Actually, I've had the same idea of using 'file' command but it's not available on windows OS which will make my script unmovable
Image::Magick uses Image::Info module which uses the exact same regexp I've used.
It might sound very optimistic for those two matches, but what i am actually interested in and will use it for is just (png,gif,jpeg) and it all depends on the way you use it.
Finally, the main intention behind writing it, is not relying on file extensions to determine if a file is an image or not as extensions are useless in Linux
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How do I find the type of an image?
by zentara (Cardinal) on Dec 28, 2009 at 16:41 UTC | |
by ahmad (Hermit) on Dec 29, 2009 at 02:05 UTC | |
by zentara (Cardinal) on Dec 29, 2009 at 12:29 UTC | |
by Anonymous Monk on Dec 29, 2009 at 13:23 UTC | |
by zentara (Cardinal) on Dec 29, 2009 at 17:06 UTC | |
| |
by ahmad (Hermit) on Dec 29, 2009 at 14:42 UTC | |
by zentara (Cardinal) on Dec 29, 2009 at 17:38 UTC | |
|
Re^2: How do I find the type of an image?
by JavaFan (Canon) on Dec 29, 2009 at 23:41 UTC | |
|
Re^2: How do I find the type of an image?
by matze77 (Friar) on Dec 30, 2009 at 10:56 UTC |