Magick::Image test1("test.txt");//will crash when running
Magick::Image test2;
test2.read("test.txt");//will also crash
I notise that read(std::string& imgSpec) does not return a value,so I cannot control my program to ignore files which are not images.
Is there any way to known a file's type, or just tell me whether a file is a image?
thanks
How do I judge a file's type?
Re: How do I judge a file's type?
We tried your code and it returned an exception as expected. We're using ImageMagick 6.3.8-0.