Auto-guess format of thumbnail from .jpg file extension

This commit is contained in:
baldurk
2017-09-20 17:05:34 +01:00
parent e037ac02ff
commit 5ccc62f1fe
+2
View File
@@ -270,6 +270,8 @@ struct ThumbCommand : public Command
type = FileType::TGA;
else if(dot != NULL && strstr(dot, "bmp"))
type = FileType::BMP;
else if(dot != NULL && strstr(dot, "jpg"))
type = FileType::JPG;
else
std::cerr << "Couldn't guess format from '" << outfile << "', defaulting to jpg."
<< std::endl;