#ifndef LOADRUNABLE_H #define LOADRUNABLE_H #include #include #include #include "imageinfo.h" class RawImage; bool readFITSHeader(const QString &path, ImageInfoData &info); bool readXISFHeader(const QString &path, ImageInfoData &info); bool loadImage(const QString &path, ImageInfoData &info, std::shared_ptr &rawImage); class Image; class LoadRunable : public QRunnable { QString m_file; Image *m_receiver; AnalyzeLevel m_analyzeLevel; bool m_thumbnail; public: LoadRunable(const QString &file, Image *receiver, AnalyzeLevel level, bool thumbnail = false); void run() override; }; class ConvertRunable : public QRunnable { public: struct ConvertParams { int compressionLevel = -1; QString compressionType; ConvertParams(){} ConvertParams(const QVariantMap &map); }; ConvertRunable(const QString &in, const QString &out, const QString &format, const ConvertParams ¶ms = ConvertParams(), QSemaphore *semaphore = nullptr); void run() override; private: QString m_infile; QString m_outfile; QString m_format; ConvertParams m_params; QSemaphore *m_semaphore; }; #endif // LOADRUNABLE_H