32 #include <QImageWriter> 40 if (filename.count (
'.') < 1)
43 const auto& ext = filename.section (
'.', -1, -1);
44 const auto& formats = QImageWriter::supportedImageFormats ();
45 return std::any_of (formats.begin (), formats.end (),
46 [&ext] (
const QByteArray& format)
47 {
return !QString::compare (ext, format, Qt::CaseInsensitive); });
52 #if defined (Q_OS_MAC) && !defined (USE_UNIX_LAYOUT) 53 return qgetenv (
"LC_BUNDLE_DIRECT_LOAD") !=
"1";
bool IsOSXLoadFromBundle()
bool HasSupportedImageExtension(const QString &filename)
Checks if the given filename has a known image extension.